Message from JavaScript discussions

December 2018

— The event-loop is already synchroneous, so everything goes ordered already, there is a need for parallel things, but it's a rare/specific use-case

Message permanent page


When you busy wait, you are doing CPU cycle wasting and waste a random amount of cycles for every loop spin, and this is non-deterministic, causing coroutines to "skip" sometimes and run in a different order suddenly

— Busywait is non-sensical in the first place so I imagine it won't be a common problem

— HertzScript solves this case for both node and browser

— Again, only matters for spawned processes, right?

— This is enough to make coroutines run non-deterministically

const end = + ms;
while ( < end);

Message permanent page

— It doesnt give anything for browser, right. as Dani cant hack Chrome/FF engine🤤

— It is all pure JS

— It matters only for spawned processes which want to take advantage of some form of deterministic execution order

Message permanent page

— Right

— Which they should not, imo

— It's the same as any other thread sync issue