[Python-ideas] Concurrency Modules
Sven R. Kunze
srkunze at mail.de
Fri Jul 10 00:53:39 CEST 2015
Hi,
that's a follow up on the discussion started on python-dev ('The
importance of the async keyword') and this issue
http://bugs.python.org/issue24571 .
After discussing the whole topic and reading it up further, it became
clear to me what's actually missing in Python. That is a definitive
guide of why/when a certain concurrency module is supposed to be used:
Currently, I can name 4 modules of which I know that they more or less
deal with the topic:
- concurrent
- threading
- asyncio
- multiprocessing
In order to make a sound decision for the question: "Which one(s) do I
use?", at least the following items should be somehow defined clearly
for these modules:
1) relationship between the modules
2) NON-overlapping usage scenarios
3) future development intentions
4) ease of usage of the modules => future syntax
5) examples
Remarks to the items:
1)
For the basic understanding
Do they complement each other?
Differences in behavior?
Do they overlap from the perspective of the programmer?
They mostly do not care about internal details; they need to get things
done (threads <-> processes) as long as the result is the same.
2) Extremely important to make the decision fast
3)
Will asyncio incorporate all concepts of the other modules in a seamless
way?
Or are they just complementary?
4) Closely related to 3)
5) Maybe in close correlation with 2) and 1)
Cheers,
Chuck
More information about the Python-ideas
mailing list