MCPcopy Create free account
hub / github.com/MorvanZhou/tutorials / job1

Function job1

threadingTUT/thread6_lock.py:8–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6import threading
7
8def job1():
9 global A, lock
10 lock.acquire()
11 for i in range(10):
12 A += 1
13 print('job1', A)
14 lock.release()
15
16def job2():
17 global A, lock

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected