Skip to content

trio.CapacityLimiter(math.inf) #618

@acarl005

Description

@acarl005

Hello. Awesome concurrency library! I almost gave up on trying to use concurrency in Python. But Trio inspired me to stick with it.

I'm writing a library on top of Trio. I was hoping for an easy way to essentially "opt-out" of a capacity limit with a simple function argument. I tried something like this

limit = trio.CapacityLimiter(math.inf)

But this fails with the following error TypeError: total_tokens must be an int. It seems like it should be possible maybe. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions