When would you use threading versus multiprocessing?
The Global Interpreter Lock and concurrency
Audio flashcard · 0:16Nortren·
When would you use threading versus multiprocessing?
0:16
Use threading for I/O-bound work like network requests, file operations, or database queries, where threads spend most of their time waiting. Use multiprocessing for CPU-bound work like numerical computation, data processing, or any code that spends most of its time executing Python bytecode.
docs.python.org