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

Function RaiseOnEvent

tensorflow/python/training/coordinator_test.py:36–47  ·  view source on GitHub ↗
(coord, wait_for_stop, set_when_stopped, ex, report_exception)

Source from the content-addressed store, hash-verified

34
35
36def RaiseOnEvent(coord, wait_for_stop, set_when_stopped, ex, report_exception):
37 try:
38 wait_for_stop.wait()
39 raise ex
40 except RuntimeError as e:
41 if report_exception:
42 coord.request_stop(e)
43 else:
44 coord.request_stop(sys.exc_info())
45 finally:
46 if set_when_stopped:
47 set_when_stopped.set()
48
49
50def RaiseOnEventUsingContextHandler(coord, wait_for_stop, set_when_stopped, ex):

Callers

nothing calls this directly

Calls 3

waitMethod · 0.45
request_stopMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected