perf: suspend when tasks are active

This commit is contained in:
Folke Lemaitre 2024-06-30 09:13:04 +02:00
parent c7ed87f9ca
commit 2f4ac035bc
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 21 additions and 2 deletions

View file

@ -153,7 +153,9 @@ function Runner:_start()
end
continue(true)
end
coroutine.yield()
if active > 0 then
self._running:suspend()
end
end
end