kyuupichan / aiorpcX

Generic async RPC implementation, including JSON-RPC
MIT License
27 stars 23 forks source link

TaskGroup: faster cancellation #9

Closed SomberNight closed 5 years ago

SomberNight commented 5 years ago

before, only one task per event loop iteration would be cancelled

I have groups with ~3000 tasks. Without this change, cancel_remaining takes 90 seconds; with it, it takes 3 seconds.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9403e1120b1e44144076f43d65ff41ec5e3a48e4 on SomberNight:faster_tg_cancellation into 9b701b2d2eae73dc42dc30744f4b4ffc932b30d5 on kyuupichan:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9403e1120b1e44144076f43d65ff41ec5e3a48e4 on SomberNight:faster_tg_cancellation into 9b701b2d2eae73dc42dc30744f4b4ffc932b30d5 on kyuupichan:master.

kyuupichan commented 5 years ago

Nice, thanks. That code was indeed a bit daft.