MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / stop

Method stop

tensorflow/python/keras/utils/data_utils.py:654–668  ·  view source on GitHub ↗

Stops running threads and wait for them to exit, if necessary. Should be called by the same thread which called `start()`. Arguments: timeout: maximum time to wait on `thread.join()`

(self, timeout=None)

Source from the content-addressed store, hash-verified

652 _SHARED_SEQUENCES[self.uid] = self.sequence
653
654 def stop(self, timeout=None):
655 """Stops running threads and wait for them to exit, if necessary.
656
657 Should be called by the same thread which called `start()`.
658
659 Arguments:
660 timeout: maximum time to wait on `thread.join()`
661 """
662 self.stop_signal.set()
663 with self.queue.mutex:
664 self.queue.queue.clear()
665 self.queue.unfinished_tasks = 0
666 self.queue.not_full.notify()
667 self.run_thread.join(timeout)
668 _SHARED_SEQUENCES[self.uid] = None
669
670 def __del__(self):
671 if self.is_running():

Callers 13

__del__Method · 0.95
on_batch_endMethod · 0.45
on_train_endMethod · 0.45
getMethod · 0.45
getMethod · 0.45
test_context_switchMethod · 0.45

Calls 3

setMethod · 0.45
clearMethod · 0.45
joinMethod · 0.45