Limit `core.threads` without a timeout to run 30 times per second
This commit is contained in:
parent
3306fc99c1
commit
e8c317494a
|
@ -1397,7 +1397,7 @@ local run_threads = coroutine.wrap(function()
|
||||||
core.threads[k] = nil
|
core.threads[k] = nil
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
wait = wait or 0
|
wait = wait or (1/30)
|
||||||
thread.wake = system.get_time() + wait
|
thread.wake = system.get_time() + wait
|
||||||
minimal_time_to_wake = math.min(minimal_time_to_wake, wait)
|
minimal_time_to_wake = math.min(minimal_time_to_wake, wait)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue