Changeset 192

Show
Ignore:
Timestamp:
06/03/06 15:30:57 (2 years ago)
Author:
blackhedd
Message:

fixed unit test

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • experiments/NewMachine/lib/machine/reactor.rb

    r190 r192  
    6565    # break out of the iterate loop in pathological cases, after a certain 
    6666    # number of events are processed. 
     67    # 
     68    # It's possible for this method to be called on the reactor from 
     69    # user code. Not sure how useful it is, but it's in the unit tests. 
     70    # Problem is that we need to set @running when we start, otherwise 
     71    # the iterate loop won't complete. (This is not needed when calling 
     72    # #iterate from #run, which sets @running before calling us.) 
     73    # There's something a little messy about this, may want to rethink. 
    6774    def iterate 
    6875      log.debug "iterating #{@dispatchers.size} dispatchers..." 
     76      @running = true 
    6977      @dispatchers.each {|d| d.iterate if running?} 
    7078      #@signalled = false