class_docstr: A thread that runs code repeatedly, optionally on a timer.
  
  This thread class is intended to be used with a `Coordinator`.  It repeatedly
  runs code specified either as `target` and `args` or by the `run_loop()`
  method.
  
  Before each run the thread checks if the coordinator has requested stop.  In
  that case the looper thread terminates immediately.
  
  If the code being run raises an exception, that exception is reported to the
  coordinator and the thread terminates.  The coordinator will then request all
  the other threads it coordinates to stop.
  
  You typically pass looper threads to the supervisor `Join()` method.
class_docstr_tok: ["A","thread","that","runs","code","repeatedly",",","optionally","on","a","timer",".","This","thread","class","is","intended","to","be","used","with","a","`","Coordinator","`",".","It","repeatedly","runs","code","specified","either","as","`","target","`","and","`","args","`","or","by","the","`","run_loop","(",")","`","method",".","Before","each","run","the","thread","checks","if","the","coordinator","has","requested","stop",".","In","that","case","the","looper","thread","terminates","immediately",".","If","the","code","being","run","raises","an","exception",",","that","exception","is","reported","to","the","coordinator","and","the","thread","terminates",".","The","coordinator","will","then","request","all","the","other","threads","it","coordinates","to","stop",".","You","typically","pass","looper","threads","to","the","supervisor","`","Join","(",")","`","method","."]
docstr: Called when the thread stops.
docstr_tok: ["Called","when","the","thread","stops","."]
code: def stop_loop(self):
      """Called when the thread stops."""
      pass
  
imports: import contextlib
  import sys
  import threading
  import time
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import compat
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 5 for calling the LooperThread obj's underlying member method code with example usage: obj.stop_loop() without return types