Message from JavaScript discussions
December 2018
— Unless you ran each with spawn
preceding it
Generally all coroutines run deterministically until you determine their ready status based on a timer like a busy wait
— 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
— 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 = performance.now() + ms;
while (performance.now() < end);
— 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
— Right