counter = Value(c_int)
counter_lock = Lock()

def increment():
    with counter_lock:
        counter.value += 1

def do_something():
    print("I'm a separate process!")
increment()
Process(target=do_something).start()
sleep(1)
print(counter.value)
Python multiprocessing easy way to implement a simple counter?