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

More efficient sleeping #8

Open
ire4ever1190 opened this issue Jan 29, 2025 · 0 comments
Open

More efficient sleeping #8

ire4ever1190 opened this issue Jan 29, 2025 · 0 comments

Comments

@ire4ever1190
Copy link
Owner

Taking a look at the code I am wondering why I am using polling for the tasks.

For async I can register a future when the queue is empty that I just complete when a new task is added (literally mimicing how I implemented the sleep cancelling for adding in new tasks)

For sync, thinking I could maybe add a conditional variable that I just await with a timer (TODO: Check how accurate the timer is). Might need to get the whole gcsafety working well first though

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