MCPcopy Create free account
hub / github.com/dabeaz/python-cookbook / thread_2

Function thread_2

src/12/locking_with_deadlock_avoidance/example1.py:12–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 print("Thread-1")
11
12def thread_2():
13 while True:
14 with acquire(y_lock, x_lock):
15 print("Thread-2")
16
17input('This program runs forever. Press [return] to start, Ctrl-C to exit')
18

Callers

nothing calls this directly

Calls 1

acquireFunction · 0.90

Tested by

no test coverage detected