MCPcopy Index your code
hub / github.com/python/cpython / thread_func

Method thread_func

Lib/test/test_free_threading/test_functools.py:20–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19
20 def thread_func():
21 b.wait()
22 for i in range(1000):
23 r = random.randint(0, 1000)
24 if i < 800:
25 func(i)
26 elif i < 900:
27 func.cache_info()
28 else:
29 func.cache_clear()
30
31 threads = []
32 for i in range(num_threads):

Callers

nothing calls this directly

Calls 3

randintMethod · 0.80
funcFunction · 0.50
waitMethod · 0.45

Tested by

no test coverage detected