Introduction In this article we will look at threading vs multiprocessing within Python, and when you should use one over the other. TL;DR * What is the GIL (Global Interpreter Lock)? - Prevents more than 1 thread being run within a single CPython Interpreter/process. * Why do we need the GIL? - CPython interpreter memory management is not thread-safe. * threading - Use when the workload is IO bound. * multiprocessing - Use when high computation required. Processes vs Threads First o

Close You've successfully subscribed to PacketFlow.
Close Success! Your account is fully activated, you now have access to all content.
Close Welcome back! You've successfully signed in.
Close Nearly there! To activate your account, please click the link in the email we just sent you.