Skip to content

Create a Limiter Protocol #2824

Description

@jakkdl

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 #2820 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    typingAdding static types to trio's interface

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions