mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-06-28 08:03:21 +00:00
![]() Unlike ComputerThread, we do not have a single source of tasks, and so need a smarter way to handle scheduling and rate limiting. This introduces a cooldown system, which works on both a global and per-computer level: Each computer is allowed to do some work for 5ms. If they go over that budget, then they are marked as "hot", and will not execute work on the next tick, until they have cooled down. This ensures that _on average_ computers perform at most 5ms of work per tick. Obviously this is a rather large time span, so we also apply a global 10ms to all computers. This uses the same cooldown principle, meaning we keep to an average of 10ms, even if we go over budget. |
||
---|---|---|
.. | ||
main | ||
test |