MCPcopy
hub / github.com/python-trio/trio / active_thread_count

Function active_thread_count

src/trio/_threads.py:115–123  ·  view source on GitHub ↗

Returns the number of threads that are currently running a task See `trio.testing.wait_all_threads_completed`

()

Source from the content-addressed store, hash-verified

113
114
115def 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
126def current_default_thread_limiter() -> CapacityLimiter:

Calls 1

getMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…