Issue
Why not just use the default one always? are there any usecases for creating multiple event loops?
Solution
I don't know the exact reason behind your question. But there are certainly use cases for using multiple loops. e.g. To increase scalability.
We know, CPU-bound code will interfere with event-loops in a process. This will reduce throughput.
Not if we have loops in other processes, event-loops in other processes will not be disturbed. Of course we have to think about locking mechanisms etc. If using asyncio
with multiprocessing
.
Answered By - nggit
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.