Please refer to the following code to solve the problem.
from threading import Lock, Thread
lock = Lock()
g = 0
Just used for demonstration. It's bad to use the 'global'
statement in general.
g += 1
g += 2
threads = 
for func in [add_one, add_two]:
for thread in threads:
Waits for threads to complete before moving on with the main
The output of this program will be 3