Changeset 190

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

comments

Files:

Legend:

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

    r189 r190  
    5858    # This will run in a tight loop unless one or more of the 
    5959    # dispatchers blocks. Typically this will be the selectable-IO dispatcher. 
     60    # The if running? clause inside the dispatcher loop is to prevent 
     61    # infinite loops when events create other events that are consumed 
     62    # immediately. 
     63    # The fact that this is possible suggests starvation of IO objects 
     64    # as a possible failure mode. We may need a throttle that will (for example) 
     65    # break out of the iterate loop in pathological cases, after a certain 
     66    # number of events are processed. 
    6067    def iterate 
    6168      log.debug "iterating #{@dispatchers.size} dispatchers..."