You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default the tasks are run as processes which confuse some. Probably we should have a poll at some point which should be preferred. But this does not explain it as it creates the process every 1 minute and the task is minimal.
However, this is probably due to that the hibernating is by default non-existent (it checks conditions aggressively constantly). You can throttle the scheduler using:
app=RedEngine(config={'cycle_sleep': 2})
Seems this configuration is int accidentally so it's a bug at least in this perspective (this is passed to time.sleep and it seems to support floats). I'm not sure if we should have a non-zero default to prevent the resource hogging. Basically this means the scheduler waits this amount of seconds every time it goes through cycle which is looping a set of tasks.
Also, does this help to set this to one, for example? This is also undocumented (as the library is quite new).
Thanks for sharing this amazing software.
Describe the bug
Running Red Engine causes 100% CPU utilization. Maybe it's busy waiting?
To Reproduce
This simple app prints "Hello World" every 1 minute.
Expected behavior
CPU not utilized at all while waiting between running tasks.
Screenshots
Desktop (please complete the following information):
Additional context
If there's some misconfiguration on my side I'd be grateful for tips.
The text was updated successfully, but these errors were encountered: