3 ms·
Is it even possible to busy wait in Erlang?
by matthavener 14y ago
Is it even possible to busy wait in Erlang?
- rdtsc 14y agoWell 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.