0

i want to send parameters between two function, but it doesn't work properly. from multiprocessing import Process

a=False

def func1():
    a=True
def func2():
    if a:
        print("hi")

if __name__ == '__main__':
  p1 = Process(target=func1)
  p1.start()
  p2 = Process(target=func2)
  p2.start()
  p1.join()
  p2.join()

Any suggestion would be appreciated.

ham
  • 11
  • 2
  • 1
    Have a look at multithreading [Pipes and Queues](https://docs.python.org/2/library/multiprocessing.html). – M. Shaw May 12 '17 at 13:28
  • 1
    Read this link : http://stackoverflow.com/questions/16044452/sharing-data-between-threads-in-python – Arpit May 12 '17 at 13:37

0 Answers0