#NEWLINE# def __init__( self , io_loop = None ) : #NEWLINE# #INDENT# if ( not io_loop ) : #NEWLINE# #INDENT# io_loop = tornado . ioloop . IOLoop . current ( ) #NEWLINE# #UNINDENT# self . _io_loop = self #NEWLINE# self . _readers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _writers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _fds = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _delayedCalls = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# PosixReactorBase . __init__ ( self ) #NEWLINE# self . addSystemEventTrigger ( 'during' , 'shutdown' , self . crash ) #NEWLINE# def start_if_necessary( ) : #NEWLINE# #INDENT# if ( not self . _started ) : #NEWLINE# #INDENT# self . fireSystemEvent ( 'startup' ) #NEWLINE# #UNINDENT# #UNINDENT# self . _io_loop . add_callback ( start_if_necessary )