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

Rewrite threads to use event objects instead of a boolean signal #8

Open
Pyker opened this issue Apr 28, 2021 · 0 comments
Open

Rewrite threads to use event objects instead of a boolean signal #8

Pyker opened this issue Apr 28, 2021 · 0 comments

Comments

@Pyker
Copy link
Contributor

Pyker commented Apr 28, 2021

https://docs.python.org/2.7/library/threading.html#event-objects

This also makes it way easier to sleep inside a thread without blocking, by using .wait(seconds). It'll immediately return if the flag is set (and when the thread checks the flag again, it'll exit).

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

No branches or pull requests

1 participant