#NEWLINE# def run( self ) : #NEWLINE# #INDENT# while True : #NEWLINE# #INDENT# ( priority , obj ) = self . queue . get ( ) #NEWLINE# if ( priority == PushThread . PUT ) : #NEWLINE# #INDENT# cursession ( ) . store_objects ( obj ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( priority == PushThread . PUSH ) : #NEWLINE# #INDENT# push ( ) #NEWLINE# if ( obj == 'after_training' ) : #NEWLINE# #INDENT# with self . queue . mutex : #NEWLINE# #INDENT# del obj . queue . queue [ : ] #NEWLINE# #UNINDENT# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . queue . task_done ( )