MCPcopy Create free account
hub / github.com/pybind/pybind11 / access_shared_instance

Function access_shared_instance

tests/test_thread.py:58–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 b = threading.Barrier(nb_threads)
57
58 def access_shared_instance():
59 b.wait()
60 for _ in range(1000):
61 m.EmptyStruct.SharedInstance # noqa: B018
62
63 threads = [
64 threading.Thread(target=access_shared_instance) for _ in range(nb_threads)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected