#NEWLINE# def request( self , input ) : #NEWLINE# #INDENT# if ( not self . _alive ) : #NEWLINE# #INDENT# raise PipeError ( ) #NEWLINE# #UNINDENT# id = self . new_id ( ) #NEWLINE# assert ( not ( id in self . requests ) ) #NEWLINE# val = Future ( ) #NEWLINE# self . requests [ id ] = val #NEWLINE# self . _pending . append ( ( id , input ) ) #NEWLINE# self . _cond . notify ( ) #NEWLINE# return val