Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cancellation tokens support #309

Open
pomponchik opened this issue Feb 27, 2024 · 0 comments
Open

Add cancellation tokens support #309

pomponchik opened this issue Feb 27, 2024 · 0 comments

Comments

@pomponchik
Copy link

Hello!

I'm looking to the code of this project now, it's very interesting. I suggest you to add support for using of cancellation tokens as well as you can to describe simple timeouts as numbers.

Why could it be useful? If you're using cancellation tokens, you're abstracting the certain reason why the operation can be cancelled. It can be a simple timeout - why not, but also it can be an another reason.

I wrote a library for this kind of stuff - cantok. If it'll be useful, i can advise you how to use it correctly.

if 0 <= timeout < time.perf_counter() - start_time:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants