Bill Kelly
2008-Apr-17 01:43 UTC
[Eventmachine-talk] run_block terminates all event descriptors ?
Hi, Is EventMachine.run_block intended to close socket connections and terminate timer events, etc., at the end of the block? I''m using EM from svn trunk, at revision 674. (head) On ruby 1.8.4 (2005-12-24) [i386-mswin32]. I had been hoping to use run_block to facilitate my unit testing, proceeding linearly through a test case, using run_block to crank the machine as needed until some state changed, then do some asserts, repeat. . . But it seems that at the end of the block executed by run_block, all my connections unbind. Is this the intended behavior? Regards, Bill
Bill Kelly
2008-Apr-17 01:55 UTC
[Eventmachine-talk] run_block terminates all event descriptors ?
From: "Bill Kelly" <billk at cts.com>> > But it seems that at the end of the block executed by run_block, > all my connections unbind. > > Is this the intended behavior?Errr... sorry, I see that is indeed the documented behavior of EventMachine::stop_event_loop. Hummmm... OK, I guess I''ll do my unit tests a different way. :) Regards, Bill