Dummy implementation of _thread.start_joinable_thread(). In dummy thread, we just run the function synchronously.
(function, handle=None, daemon=True)
| 83 | |
| 84 | |
| 85 | def start_joinable_thread(function, handle=None, daemon=True): |
| 86 | """Dummy implementation of _thread.start_joinable_thread(). |
| 87 | |
| 88 | In dummy thread, we just run the function synchronously. |
| 89 | """ |
| 90 | if handle is None: |
| 91 | handle = _ThreadHandle() |
| 92 | try: |
| 93 | function() |
| 94 | except SystemExit: |
| 95 | pass |
| 96 | except: |
| 97 | import traceback |
| 98 | |
| 99 | traceback.print_exc() |
| 100 | handle._set_done() |
| 101 | return handle |
| 102 | |
| 103 | |
| 104 | def daemon_threads_allowed(): |
nothing calls this directly
no test coverage detected