You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 12, 2022. It is now read-only.
First, thank you for sharing your work. I just so happened to want a job system for my project and thought I would start by testing yours.
So in my project, I have 2 threads dedicated to certain tasks and the remaining would be workers. In one of the dedicated thread, I create a few jobs to be run:
lucy::SignalHandle finished = lucy::INVALID_HANDLE;
for (int i = 0; i < 10; ++i) {
lucy::run(nullptr, jobB, &finished);
}
lucy::wait(finished);
lucy::wait() calls getWorker() which is null since we did not create any worker on this thread.
I have attached a simple example (based on your main.cpp example code) if you want to reproduce the bug.
Ideally, such thread should help with jobs while waiting. This is however not possible in fiber-based job system since the thread would have to be converted to a fiber thread, which I can not do since it's user's thread. In Lumix Engine, I have a backup worker threds, which I enable in such cases https://github.com/nem0/LumixEngine/blob/ffr/src/renderer/renderer.cpp#L922
I expected the behaviour of wait to be the one you linked (https://github.com/nem0/LumixEngine/blob/ffr/src/engine/job_system.cpp#L565-L579), a blocking wait. I decided to make my own job system for the time being as lucy does not seem suited for what I intended to make. I want to run jobs sometimes (like loading data in the background for example), and lucy seems very much built towards running a lot of jobs, all the time.
For the time being, I kindly suggest updating the mini docs to make the wait() function's behaviour a bit clearer.
Thank you for the detailed answer nem0, I will definitely come back to lucy when I get around to making an everything is a job program.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
First, thank you for sharing your work. I just so happened to want a job system for my project and thought I would start by testing yours.
So in my project, I have 2 threads dedicated to certain tasks and the remaining would be workers. In one of the dedicated thread, I create a few jobs to be run:
lucy::wait()
callsgetWorker()
which is null since we did not create any worker on this thread.I have attached a simple example (based on your main.cpp example code) if you want to reproduce the bug.
main.zip
The text was updated successfully, but these errors were encountered: