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

WaitforAll() and external threads #51

Closed
Vuhdo opened this issue Jan 17, 2020 · 5 comments
Closed

WaitforAll() and external threads #51

Vuhdo opened this issue Jan 17, 2020 · 5 comments
Assignees

Comments

@Vuhdo
Copy link

Vuhdo commented Jan 17, 2020

WaitForAll() adds a dummy pinned task and then waits:

WaitforTask( &dummyWaitTask );

Sometimes WaitForAll() won't awake.

Not sure if it is due to recent changes, but I have never experienced this problem until today
when I merged the master into my fork.

It seems when this happens the thread we're pinning the dummy task to, is an external thread (added via RegisterExternalTaskThread()). In my case this was the dedicated rendering thread - it handles main thread requests and sleeps, never running tasks explicitly, so there's no guarantee it will run the dummy task at all.

@dougbinks dougbinks self-assigned this Jan 17, 2020
@dougbinks
Copy link
Owner

Thanks for the report - I'll take a look at this asap.

@dougbinks
Copy link
Owner

I've posted a potential fix for this issue to the dev branch, and will look into adding a test for this situation. In the meantime if you're able to try this out it would be very helpful.

@Vuhdo
Copy link
Author

Vuhdo commented Jan 17, 2020

The fix helped, no more hangs, thanks!

@dougbinks
Copy link
Owner

Thanks - I'll close this and merge to master and add a test at some point, do let me know if you experience any further issues and once again thanks for the report!

@dougbinks
Copy link
Owner

This is now merged to the master branch.

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

2 participants