IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New But that's not quite the same as recursion.
As far as I understand it, the difference lies in how the routines handle pre-emption: do they abandon the earlier calls, or do they try to (eventually) service all requests? This is also tangled up with how triggers are addressed: Are they queued, or are they taken immediately? Hardware IRQ is usually done the latter (though the interrupts can be queued in hardware) but by contrast Windows message handling is mostly the former. An IRQ routine must decide whether it allows itself to be pre-empted with additional calls or not. Code hanging off a traditional Windows message loop doesn't have that concern: there are well defined points where the message-handler can get called and that isn't usually from within the handler itself.

You mentioned runaway triggers. If that's possible, the design should think of that and have some defenses in place. Referring back to the Windows message loop again; certain types of frequent messages (mouse updates are the canonical example, IIRC) are co-alesced into fewer messages by the queue handler. This means your message handler doesn't get bombarded by out-of-date mouse movements that it can't handle fast enough. Then, too, this is largely possible because the message handler must usually complete and exit before Windows will hand it another message to process.

Tackling trigger/message flooding is not really the same as bounding recursion.

Wade.

"Ah. One of the difficult questions."

Collapse Edited by static Sept. 17, 2002, 02:54:04 AM EDT
But that's not the same as recursion.

"Ah. One of the difficult questions."

     The Myth of Code-centricity - (tonytib) - (15)
         Agreed that his answers only work in one problem domain - (ben_tilly) - (2)
             Remember where the article appeared - (tonytib) - (1)
                 I did - (ben_tilly)
         What if the tools have bugs? - (ChrisR) - (6)
             Good comments! (so obviously I agree. :)) - (a6l6e6x)
             Event-driven code can make the flow harder to follow - (tonytib) - (4)
                 re: Event-driven code can make the flow harder to follow - (tablizer) - (3)
                     Not recursion per se... - (ChrisR) - (2)
                         re: Not recursion per se... - (tablizer) - (1)
                             But that's not quite the same as recursion. - (static)
         He just described NextStep (now Apple Cocoa) - (tuberculosis) - (1)
             I also thought anonymous collab was the most interesting - (tonytib)
         re: Demoting source code - (tablizer) - (2)
             lets put this in cruder human terms - (boxley) - (1)
                 I can't translate that analogy into SW engineering issues -NT - (tablizer)

What a cruddy, unimaginative anti-climax.
68 ms