(coord, wait_for_stop, set_when_stopped, ex, report_exception)
| 34 | |
| 35 | |
| 36 | def 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 | |
| 50 | def RaiseOnEventUsingContextHandler(coord, wait_for_stop, set_when_stopped, ex): |
nothing calls this directly
no test coverage detected