Re:We switched to Node.js: the good and the not so good
by matthavener on Monday January 14, 2013 @12:06PM
(#5055444)
Is it even possible to busy wait in Erlang?
[ Parent
| on HN ]
Re:We switched to Node.js: the good and the not so good
by rdtsc on Monday January 14, 2013 @01:17PM
(#5055787)
Well do you mean per-process or for the whole node? You'd have to go out of your way in any case. For process you could create a tail recursive loop that just calls itself. It will run for 2000 reductions then the scheduler will kick it out and so on. But it own't block other processes.
To block a whole node'd have to perhaps write a native functions a (NIF) and do it there. Which is also a reason to be careful with NIFs, they can kill predictable latency under load, while initially in serial benchmarks they could show a performance improvement.