firefly icon indicating copy to clipboard operation
firefly copied to clipboard

Lower CPU usage when waiting for timers

Open KronicDeth opened this issue 5 years ago • 0 comments

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.

KronicDeth avatar Aug 12 '20 01:08 KronicDeth