Changeset 149

Show
Ignore:
Timestamp:
05/26/06 19:23:08 (2 years ago)
Author:
blackhedd
Message:

comments

Files:

Legend:

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

    r147 r149  
     1# PLACEHOLDER FOR LICENSE TEXT. 
     2# THIS IS COPYRIGHTED SOFTWARE. 
     3 
     4 
     5# Notes of various kinds: 
     6# 
     7# There's a quite serious bug in here related to connection shutdown. 
     8# If the reactor stops suddenly (like with ctrl-C), and it's holding 
     9# TCP connections that it has accepted, the connections don't get 
     10# properly run down, and the next run may not allow the server to 
     11# re-bind. This is probably a consequence of the fact that the objects 
     12# created by accept_nonblock are not normal TCPSockets but plain Sockets. 
     13# Fix by trapping Ctrl-C during reactor runs and scheduling 
     14# a close of all closeable IO objects before stopping. 
     15# 
     16 
    117module Machine 
    218  require 'singleton'