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

Error while waiting for counter when not using manager main callback #6

Open
MohammadMDSA opened this issue Oct 5, 2022 · 1 comment

Comments

@MohammadMDSA
Copy link
Contributor

MohammadMDSA commented Oct 5, 2022

Hi!
I am using the project in my game engine. The scopes of my main loop and job system manager are completely different so I can't put any function in the Manager::Run() method as a callback. The problem is when there is no main callback for the manager, the CurrentFiberIndex property of the main thread tls wouldn't initialize, so when calling Manager::WaitForCounter(), inside the function, an invalid value gets passed as tls->CurrentFiberIndex (65535) and later on I get an exception for accessing fiber index 65535. It is very easy to reproduce: You just have to provide no main function for the Run function and try to wait for a counter. Please HELP!!!!

@Freeeaky
Copy link
Owner

Freeeaky commented Oct 6, 2022

Hi, I highly recommend using the main function. There is no downside to wrapping your entire code within this function.

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