Python share values
问题 in my project a have multiple flags like this: file_a = False file_b = False file_c = False and I'm trying to run two processes, one (call it A from now) handles incoming messages on message queue, second (call it B from now) handles some data processing. B operates on boolean flags, and A sets those values: def a(): while True: ... ... file_a = True ... def b(): while True: ... if file_a: process(file_a) ... a_proc = Process(target=a) b_proc = Process(target=b) a_proc.start() b.proc.start()