Alex MacArthur
38 total comments
-
-
May 21, 2025
Mission accomplished!
-
May 21, 2025
Thanks, Paul 🙏
-
May 15, 2025
Thanks! Very glad it was helpful. 👍
-
May 15, 2025
Thanks, Hagenek! That means a lot.
-
May 15, 2025
I appreciate that! Glad it was helpful.
-
Feb 11, 2025
That's something I definitely didn't know before you said something... so I'm glad you did!
-
Feb 11, 2025
Yes, but they don't actually appear to yield to the event loop. It looks like they're synchronous by default. I tried it with the following setup:
function* process() { const items = new Array(100).fill(null); for (const i of items) { waitSync(50); yield i; } } for (const i of process()) { loopCount.innerText = Number(loopCount.innerText) + 1; console.log(i); } -
Feb 11, 2025
Good callout. The minimum delay that kicks in with
setTimeout()s will drive you nuts if you don't know why it's happening. -
Feb 11, 2025
Good catch. Got it updated. Thanks!
Thank you, Ondřej!