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

Method write

Lib/test/test_free_threading/test_mmap.py:92–98  ·  view source on GitHub ↗
(mm_obj)

Source from the content-addressed store, hash-verified

90 per_thread_write_loop = 100
91
92 def write(mm_obj):
93 # Each thread picks a unique letter to write
94 thread_letter = thread_letters.pop(0)
95 thread_bytes = (thread_letter * 2).encode()
96 for _ in range(per_thread_write_loop):
97 mm_obj.write_byte(thread_bytes[0])
98 mm_obj.write(thread_bytes)
99
100 with mmap.mmap(
101 ANONYMOUS_MEM, per_thread_write_loop * 3 * NTHREADS

Callers 6

test_readlineMethod · 0.45
test_moveMethod · 0.45
find_and_rfindMethod · 0.45
test_flushMethod · 0.45

Calls 2

popMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected