— How do you decide to do this without hertz?
— Pretty simply, recursive setTimeout
— With hertz:
spawn logForever(1);
spawn logForever(2);
— Its when your code scales up when that becomes costly
— Without changing the implementation of logForever
— Ah, right, you would have to without hz
— Using setTimeout inside logForever breaks the point
— Because the point is to make synchronous code concurrent
— Right, so what hz does is "simulate" threads, that is what N:1 thread model is... it means running N 'simulated" threads on 1 real OS thread
Message permanent page
— Hertz gives you threads in the browser too