Return a list of all Thread objects currently alive. The list includes daemonic threads, dummy thread objects created by current_thread(), and the main thread. It excludes terminated threads and threads that have not yet been started.
()
| 1518 | return list(_active.values()) + list(_limbo.values()) |
| 1519 | |
| 1520 | def enumerate(): |
| 1521 | """Return a list of all Thread objects currently alive. |
| 1522 | |
| 1523 | The list includes daemonic threads, dummy thread objects created by |
| 1524 | current_thread(), and the main thread. It excludes terminated threads and |
| 1525 | threads that have not yet been started. |
| 1526 | |
| 1527 | """ |
| 1528 | with _active_limbo_lock: |
| 1529 | return list(_active.values()) + list(_limbo.values()) |
| 1530 | |
| 1531 | |
| 1532 | _threading_atexits = [] |