What is the difference between threading and multiprocessing?
Answer
•threading — threads in one process, shared GIL.
•Good for I/O tasks.
•multiprocessing — separate processes, parallelize CPU.
•IPC and serialization are more expensive.
•Choice depends on workload profile.
Was this answer helpful?