Returns the number of threads that are currently running a task See `trio.testing.wait_all_threads_completed`
()
| 113 | |
| 114 | |
| 115 | def active_thread_count() -> int: |
| 116 | """Returns the number of threads that are currently running a task |
| 117 | |
| 118 | See `trio.testing.wait_all_threads_completed` |
| 119 | """ |
| 120 | try: |
| 121 | return _active_threads_local.get().count |
| 122 | except LookupError: |
| 123 | return 0 |
| 124 | |
| 125 | |
| 126 | def current_default_thread_limiter() -> CapacityLimiter: |
searching dependent graphs…