firefly
firefly copied to clipboard
Lower CPU usage when waiting for timers
We might need to add some sleeps if everything is waiting and all we're doing is checking for signals in the outer scheduler loop. A simple receive with no after spikes the CPU to 100%
init.erl
-module(init).
-export([start/0]).
start() ->
receive
Message -> Message
end,
ok.