3 ms·
Then one should talk about how convenient the related abstractions are. I like the concurrent.futures library.
by xapata 6y ago
Then one should talk about how convenient the related abstractions are. I like the concurrent.futures library.
- colonwqbang 6y agoConcurrency 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.
- xapata 6y agoI 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.