When to Use concurrent.futures or multiprocessing
In this lesson, you’ll see which situations might be better suited to using either
multiprocessing. You’ll also learn about how that ties in with the Global Interpreter Lock (GIL).
Because of the GIL, no two threads can execute Python code at the same time. So even if you have multiple threads running in your Python program, only one of them can execute at a time. The best way to get around this is to use process-based parallel programing, or process-based parallelism.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
Comments & Discussion
Become a Member to join the conversation.