Unanswered
Dan's answer is excellent. For number 5, I suppose you come from a C# .NET background. Python does support cancellation of async functions. It works a bit different from C#, so I suggest reading up on how aync functions work in Python to understand this, I would start here and continue looking through the documentation to find what you are looking for: https://docs.python.org/3/library/asyncio-task.html
31 Views
0
Answers
4 years ago
4 years ago
That's not entirely true, if you were running a bunch of simultaneous async tasks with something like asyncio.gather(), you could indeed call .cancel on the remaining tasks in the list. It's just that level of optimization is not something we typically deal with at our level. If you run into a use case that needs it, please ask another question here!
— Brian Mego 4 years agoReading asyncio-task definitely help me how it handle t hose async methods better now. Thanks!
— Rocky Smith 4 years ago