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

Bug in JobScheduler makes Arch not close all job threads. #197

Closed
Epicguru opened this issue Jan 8, 2024 · 2 comments
Closed

Bug in JobScheduler makes Arch not close all job threads. #197

Epicguru opened this issue Jan 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Epicguru
Copy link
Contributor

Epicguru commented Jan 8, 2024

This is actually an issue in the version of ZeroAllocJobScheduler that is currently being used in Arch.
As far as I can tell this has been fixed in more recent versions of that library.

Currently when the JobScheduler is disposed, it notifies a cancellation token and disposes a ManualResetEvent.
This does not correctly cause the worker thread to exit.

image
The worker thread is stuck waiting on line 53 above. Calling Dispose on the MRE does not stop waiting (tested on .net 8.0 but I don't think this has changed recently). Of course because the thread is stuck waiting, the cancellation token does nothing.

In my project this caused my game to not close properly, and for unit tests to run indefinitely.

I am leaving this issue here to let other people know that they should fork and fix until the new version of ZeroAllocJobScheduler has been put in to Arch.

@genaray genaray added the bug Something isn't working label Jan 8, 2024
@genaray
Copy link
Owner

genaray commented Jan 8, 2024

Thanks!
Soon the new version will be introduced which should then fix this issue :)

@genaray
Copy link
Owner

genaray commented Feb 15, 2024

Should be fixed since 878381f.
Otherwhise reopen the issue ^^

@genaray genaray closed this as completed Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants