Re:Guido van Rossum joins Microsoft
by xapata on Friday November 13, 2020 @02:54AM
(#25080060)
Then one should talk about how convenient the related abstractions are. I like the concurrent.futures library.
[ Parent
| on HN ]
Re:Guido van Rossum joins Microsoft
by colonwqbang on Saturday November 14, 2020 @09:48AM
(#25092569)
Concurrency is not the same as parallelism. Python has good concurrency support, I agree. Python (C Python) does not support parallelism however due to its Big Interpreter Lock which actively prevents any parallelism in Python code.
This was probably a conscious design decision on the part of C Python implementers and perhaps a good one. But we should not claim that Python is something which (actively and by design) it's not.
I use `concurrent.futures.ProcessPoolExecutor` fairly often. I handle inter-process communication usually through a database or message queue, expecting that someday I'll want to go clustered instead of just single-machine multiprocessing. I've been burned by implementing multithreading and then needing to overhaul to clustered enough times to stop doing it.