4 ms·
Where is erlang? Sleeping is not running, by the way. If you just sleep, in Erlang you would use a hibernated process. I feel this is so misleading. For examp
by octacat 2y ago
Where is erlang?
Sleeping is not running, by the way. If you just sleep, in Erlang you would use a hibernated process.
I feel this is so misleading. For example, by default after spawning, Erlang would have some memory preallocated for each process, so they don't need to ask the operation system for new allocations (and if you want to shrink it, you call hibernate).
Do something more real, like message passing with one million processes or websockets. Or 1M tcp connections. Because, the moment you send messages, here is when the magic happens (and memory would grow, the delay when each message is processed would be different in different languages).
Oh, and btw, if you want to do THAT in erlang, use timer:apply_after(Time, Module, Function, Arguments). Which would not spawn an erlang process, just would put the task to the timer scheduling table.
And Elixir was in the old article, and they implemented it all wrong. Sad.