MCPcopy
hub / github.com/jwasham/practice-python / main

Function main

experiments/threads2.py:28–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27
28def main():
29
30 global database, lock
31
32 lock = threading.Lock()
33 database = []
34
35 threads = []
36 for i in range(15):
37 threads.append(threading.Thread(target=count_up, args=(i+1,)))
38 threads[i].start()
39
40 for th in threads:
41 th.join()
42
43 print(database)
44
45
46if __name__ == '__main__':

Callers 1

threads2.pyFile · 0.70

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected