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
Get the full article
Sign up now to read in full and get access to the full library of premium articles.
Sign Up NowAlready have an account? Sign in