trio icon indicating copy to clipboard operation
trio copied to clipboard

Create a Limiter Protocol

Open jakkdl opened this issue 2 years ago • 0 comments

Obviously not something to do here, but I'd think it'd make most sense to do a protocol, with only the 6 acquire_*/release_* methods. That's all that a task needs to be limited, the others are only relevant for CapacityLimiter's simple token strategy. The implementations of acquire()/release() could be included in the protocol since they defer to the on_behalf_of methods.

Originally posted by @TeamSpen210 in https://github.com/python-trio/trio/pull/2820#discussion_r1364680964

jakkdl avatar Oct 19 '23 13:10 jakkdl