Hacker News new | ask | show | jobs
by TheCondor 2864 days ago
The thread workers pool circumvent the GIL if you carefully follow some rules. I think the arguments and results need to be pickleable.
1 comments

I think you're thinking of the multiprocessing module, which uses separate processes to bypass the GIL. That's why the arguments and results need to be pickleable: pickle is a serialisation procotol, so it allows you to communicate the contents of objects between different processes. If you use threads within a single process, you don't need to pickle the objects; you just pass the object directly.