Changeset 189
- Timestamp:
- 06/03/06 15:15:12 (3 years ago)
- Files:
-
- experiments/NewMachine/lib/machine/reactor.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
experiments/NewMachine/lib/machine/reactor.rb
r185 r189 8 8 require 'singleton' 9 9 10 # TODO: Sooner or later, someone will figure out how to construct 11 # a situation in which an event is pended but has to wait for half 12 # a second while the select loop in EventableIO times out. 13 # That's the point of the "event-signal" which is implemented here 14 # but commented out for the moment. We create a socketpair that 15 # gets written to when an event is queued on any dispatcher. That 16 # drops the EventableIO dispatcher out of its select loop. 17 # Uncomment the implementation when we come up with a test case 18 # that needs it. 10 19 class Reactor 11 20 include LogSupport … … 50 59 # dispatchers blocks. Typically this will be the selectable-IO dispatcher. 51 60 def iterate 52 log.debug "iterating ..."53 @dispatchers.each {|d| d.iterate }61 log.debug "iterating #{@dispatchers.size} dispatchers..." 62 @dispatchers.each {|d| d.iterate if running?} 54 63 #@signalled = false 55 64 end
