Return the current Thread object, corresponding to the caller's thread of control. If the caller's thread of control was not created through the threading module, a dummy thread object with limited functionality is returned.
()
| 1461 | # Global API functions |
| 1462 | |
| 1463 | def current_thread(): |
| 1464 | """Return the current Thread object, corresponding to the caller's thread of control. |
| 1465 | |
| 1466 | If the caller's thread of control was not created through the threading |
| 1467 | module, a dummy thread object with limited functionality is returned. |
| 1468 | |
| 1469 | """ |
| 1470 | try: |
| 1471 | return _active[get_ident()] |
| 1472 | except KeyError: |
| 1473 | return _DummyThread() |
| 1474 | |
| 1475 | def currentThread(): |
| 1476 | """Return the current Thread object, corresponding to the caller's thread of control. |
no test coverage detected
searching dependent graphs…