3 ms·
The execution flow you describe is similar to JS' event loop and (I think, I'm not very experienced at C#) C#'s async/await functionality. It's a godsend in JS
by beaconstudios 5y ago
The execution flow you describe is similar to JS' event loop and (I think, I'm not very experienced at C#) C#'s async/await functionality. It's a godsend in JS for exactly the reasons you describe.
I haven't written any Dream code so I can't / wasn't speaking to the language design itself, and I got started in php and actually mostly like it for its design and accessibility so I wouldn't be the guy to shit on the language. I'm just aware that the platform is kinda crashy and non performant.
- MrStonedOne 5y ago> The execution flow you describe is similar to JS' event loop yes, in mechanic, the biggest benefit is you can get it via a control statement so its as easy as typing a keyword and an additional indentation block, ie, you can do it mid function and the function level vars just get copied over, or you can mark the entire function as non-blocking and the stack detaches at the first sleep, but at the non-blocking function, even if the sleep is 10 calls deep from that function. All without the caller of the non-blocking function needing to do anything (the biggest difference from c#'s async/await). You can even define this on a base function and all 50 million overrides can be trusted to not block the caller.