parlai/core/worlds.py
def shutdown(self):
        """Set shutdown flag and wake threads up to close themselves."""
        # set shutdown flag
        with self.sync['term_flag'].get_lock():
            self.sync['term_flag'].value = True
        # wake up each thread by queueing fake examples or setting reset flag
        for _ in self.threads:
            self.sync['queued_sem'].release()
            self.sync['reset_sem'].release()
        # wait for threads to close
        for t in self.threads:
            t.join()
        self.inner_world.shutdown()
Set shutdown flag and wake threads up to close themselves.
Set shutdown flag and wake threads up to close themselves.
Set shutdown flag and wake threads up to close themselves .
def shutdown(self):
        with self.sync['term_flag'].get_lock():
            self.sync['term_flag'].value = True
        for _ in self.threads:
            self.sync['queued_sem'].release()
            self.sync['reset_sem'].release()
        for t in self.threads:
            t.join()
        self.inner_world.shutdown()
def shutdown ( self ) : with self . sync [ 'term_flag' ] . get_lock ( ) : self . sync [ 'term_flag' ] . value = True for _ in self . threads : self . sync [ 'queued_sem' ] . release ( ) self . sync [ 'reset_sem' ] . release ( ) for t in self . threads : t . join ( ) self . inner_world . shutdown ( )
Set shutdown flag and wake threads up to close themselves.
Set shutdown flag and wake threads up to close themselves .
"""Set shutdown flag and wake threads up to close themselves.""" # set shutdown flag # wake up each thread by queueing fake examples or setting reset flag # wait for threads to close
self