Comments (2)
Hi LordSk,
there are two options. One is to deal with it like I do in the demo https://github.com/nem0/lucy_job_system/blob/master/src/main.cpp#L46. Another is the way like I do it Lumix Engine https://github.com/nem0/LumixEngine/blob/ffr/src/engine/job_system.cpp#L565-L579. Both options will block the calling thread, which might be not what you want.
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
Let me know which option is the best for you.
from lucy_job_system.
Hello nem0.
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.
from lucy_job_system.
Related Issues (2)
- Rewrite in rust HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lucy_job_system.