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

Use coroutines for better thread utilization #2

Open
Avokadoen opened this issue Jul 12, 2023 · 0 comments
Open

Use coroutines for better thread utilization #2

Avokadoen opened this issue Jul 12, 2023 · 0 comments

Comments

@Avokadoen
Copy link

Currently zjobs will stall a thread if it hit a job that is blocked by a in-flight job.

If we had some sort of coroutines support then we could simply yield in that case and enqueue the job again. The thread could then try to pick up another job. If the same stalled job is picked up twice while remaining stalled then threads can sleep and let the thread that is currently working on the job that is blocking grab the stalled job once it is done.

@hazeycode hazeycode transferred this issue from zig-gamedev/zig-gamedev Nov 5, 2024
@hazeycode hazeycode changed the title [zjobs] Use coroutines for better thread utilization Use coroutines for better thread utilization Nov 5, 2024
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