Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multiprocessing
#1
I have 2 functions to run in series and it takes 2 minutes in total to finish (on Windows 10 x64, python 3.6 x64)
Then I try to run them concurrently as below and want to finish faster. But it takes 4 minutes in total. what is wrong? Thanks

p1 = multiprocessing.Process(update1)
p2 = multiprocessing.Process(update2)
p1.start()
p2.start()
p1.join()
p2.join()
Reply
#2
Guessing: Serializing and deserializing takes more time as your function.

Without your code, it's just guessing.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020