Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ writer_func
Method
writer_func
Lib/test/test_free_threading/test_str.py:17–21 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
15
READERS = 10
16
done_event = Event()
17
def
writer_func():
18
for
i in range(ITERS):
19
l.extend(map(str, range(i)))
20
l.clear()
21
done_event.set()
22
def
reader_func():
23
while
not done_event.is_set():
24
''
.join(l)
Callers
nothing calls this directly
Calls
3
extend
Method · 0.45
clear
Method · 0.45
set
Method · 0.45
Tested by
no test coverage detected