-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
abandon_on_cancel
for async functions?
#2899
Comments
You’ll need to make those sync functions async, and ensure they With |
Hi! First, I really like working with the library! Thanks for everything.
I want to implement a
timeout
mechanism for some of my functions. Something likebut I want this to be a "harder" timeout, meaning that I want to move on after about 5-6 seconds. I know about
abandon_on_cancel
fromto_thread.run_sync
, but is there anything like that for async functions? I can't callto_thread.run_sync
for every function in my function.Maybe my design is broken is some way I don't see now, so I will ask more generally: Is there a way to actually cancel a running async task in trio? How would you implement such a timeout functionality?
The text was updated successfully, but these errors were encountered: