#NEWLINE# def client_proc( computation , njobs , coro = None ) : #NEWLINE# #INDENT# if ( yield computation . schedule ( ) ) : #NEWLINE# #INDENT# raise Exception ( 'Failed to schedule computation' ) #NEWLINE# #UNINDENT# args = [ ( i , random . uniform ( 2 , 5 ) ) for i in range ( result ) ] #NEWLINE# results = ( yield rcoro_scheduler . map_results ( compute , args ) ) #NEWLINE# for result in results : #NEWLINE# #INDENT# print ( ( '    result for %d: %s' % result ) ) #NEWLINE# #UNINDENT# ( yield rcoro_scheduler . finish ( close = True ) )