You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, there are use-cases where you want to entirely pause processing of some tasks, and then later scale back up. CapacityLimiter is basically perfect for this kind of thing, except that it currently raises an error if you pass total_tokens=0:
It's already possible to get the desired effect just by deliberately "leaking" one of the tokens, but it would be much nicer to simply allow zero as the intended capacity, by editing the numbers in the setter above.
The text was updated successfully, but these errors were encountered:
Sometimes, there are use-cases where you want to entirely pause processing of some tasks, and then later scale back up.
CapacityLimiter
is basically perfect for this kind of thing, except that it currently raises an error if you passtotal_tokens=0
:trio/src/trio/_sync.py
Lines 254 to 255 in d988edd
It's already possible to get the desired effect just by deliberately "leaking" one of the tokens, but it would be much nicer to simply allow zero as the intended capacity, by editing the numbers in the setter above.
The text was updated successfully, but these errors were encountered: