You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
300B

  1. import multiprocessing as mp
  2. def aa1(aa2):
  3. print("1111111111", id(aa2), aa2)
  4. aa = [1, 2, 3, 4, 5, 6]
  5. print(id(aa))
  6. # num = mp.Array('i', aa)
  7. p = mp.Process(target=aa1, args=(aa,))
  8. p1 = mp.Process(target=aa1, args=(aa,))
  9. p2 = mp.Process(target=aa1, args=(aa,))
  10. p.start()
  11. p1.start()
  12. p2.start()