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

Method worker

Lib/test/test_free_threading/test_json.py:39–46  ·  view source on GitHub ↗
(barrier, data, index)

Source from the content-addressed store, hash-verified

37
38 def test_json_mutating_list(self):
39 def worker(barrier, data, index):
40 barrier.wait()
41 while data:
42 for d in data:
43 if len(d) > 5:
44 d.clear()
45 else:
46 d.append(index)
47
48 data = [[], []]
49 encode_json_helper(self.json, worker, data)

Callers

nothing calls this directly

Calls 5

listClass · 0.85
waitMethod · 0.45
clearMethod · 0.45
appendMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected