#NEWLINE# def _set( self , i , success_result ) : #NEWLINE# #INDENT# ( success , result ) = success_result #NEWLINE# if success : #NEWLINE# #INDENT# self . _value [ ( i * self . _chunksize ) : ( ( i + 1 ) * self . _chunksize ) ] = result #NEWLINE# self . _number_left -= 1 #NEWLINE# if ( self . _number_left == 0 ) : #NEWLINE# #INDENT# if self . _callback : #NEWLINE# #INDENT# self . _callback ( self . _value ) #NEWLINE# #UNINDENT# del self . _cache [ self . _job ] #NEWLINE# self . _event . set ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . _success = False #NEWLINE# self . _value = result #NEWLINE# if self . _error_callback : #NEWLINE# #INDENT# self . _error_callback ( self . _value ) #NEWLINE# #UNINDENT# del self . _cache [ self . _job ] #NEWLINE# self . _event . set ( )