3 ms·
These are "embarassingly parallel" examples that multiprocessing is ok for, though. There was always the small caveat that you can't pickle a file handle, but i
by hot_gril 2y ago
These are "embarassingly parallel" examples that multiprocessing is ok for, though. There was always the small caveat that you can't pickle a file handle, but it wasn't a real problem. Threads are more useful if you have lots of shared state and mutexes.
I think these examples would also perform well with GIL'd threads, since the actual Python part is just waiting on blocking calls that do the expensive work. But maybe not.
- kstrauser 2y ago> Threads are more useful if you have lots of shared state and mutexes. That's what always kicks me in such things. If the processes are truly completely separable, awesome! It never seems like they are as much as I wish they were.