#NEWLINE# def _set( self , i , obj ) : #NEWLINE# #INDENT# self . _cond . acquire ( ) #NEWLINE# try : #NEWLINE# #INDENT# if ( self . _index == i ) : #NEWLINE# #INDENT# self . _items . append ( obj ) #NEWLINE# self . _index += 1 #NEWLINE# while ( self . _index in self . _unsorted ) : #NEWLINE# #INDENT# obj = self . _unsorted . pop ( self . _index ) #NEWLINE# self . _items . append ( obj ) #NEWLINE# self . _index += 1 #NEWLINE# #UNINDENT# self . _cond . notify ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _unsorted [ self ] = obj #NEWLINE# #UNINDENT# if ( self . _index == self . _length ) : #NEWLINE# #INDENT# del self . _cache [ self . _job ] #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# self . _cond . release ( )