-
Notifications
You must be signed in to change notification settings - Fork 25
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
Trouble Nesting stopit #17
Comments
Please read the README section about the timeout accuracy issue when using thread blocking funcs like time.sleep(xxx) within a Timeout context manager. |
I don't believe this is a timing issue. My point is that nesting threading blocks literally do not work. Could you provide a pattern or an example where it does work? I could replace the for loop with an infinite loop and it would never terminate. As an example this would never terminate
|
Hi, I had the same issue, and it's related with the fact that the ThreadingTimeout set a timer on the same thread_id (https://github.com/glenfant/stopit/blob/master/src/stopit/threadstop.py#L45). Only way to solve this is to set-up different thread, or find a way to raise different exception per context manager. |
Hi,
I'm having a bit of trouble nesting timeouts. Platforms tested:
My shortest reproducible solution is here:
Where the output is:
The text was updated successfully, but these errors were encountered: