Comments (8)
The updateQueue is useful, but adds a bit of overhead. The overhead is involved in gracefully handling failures during updates of items in the queue. In essence, if an update hangs on an item in the queue, the rest of the queue is still processed with no issues. You would use this if you had a smallish number of items that may take a long time to update, or may hang while updating. Mobs, for instance. Goonstation has had problems with mob updates hanging the process, so we use updateQueue for that. Mobcode is nuts.
If you have a whole lot of objects that don't take a lot of time to update (machines, pipenets, etc), you don't want to use updateQueue. Just write a loop for those in the process and call scheck() inside the loop.
from processscheduler.
Thanks a bunch, that helps clarify things a lot; much much appreciated!
from processscheduler.
Just another quick question. For deferring process to the next tick (in update queues and scheck), wouldn't it be better/adventageous to defer it for world.tick_lag
instead of 1 decisecond?
from processscheduler.
When scheck decides to defer, the world tick is already going into overtime - deferring for the smallest interval makes it so that the work is simply pushed over into the next world tick, rather than pushing it forward a specific length of time. So deferring for tick_lag
would actually push the work farther down the queue than desired.
from processscheduler.
If that's the case then, why was one decisecond chosen? Why not lower, if you want to defer for the smallest interval possible? Correct me if I'm wrong, but wouldn't sleeping tick_lag
be less than sleeping for one decisecond? (given that tick_lag
is usually 0.9 deciseconds..though some servers utilize 0.5)
If I'm misunderstanding you here, I apologize!
from processscheduler.
@Fox-McCloud That's a great question actually! I'll do some experiments and see what the effect of sleeping tick_lag versus 1 is.
from processscheduler.
Great! Lemme know how it turns out!
from processscheduler.
Byond rounds sleep() to the next tick. so you can do sleep(0.01) to ensure you run next tick logical tick.
from processscheduler.
Related Issues (5)
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 processscheduler.