Hacker News new | ask | show | jobs
by nottorp 896 days ago
> it covers both what i'm calling 'cooperative multitasking' and things like async/await, the npm event handler model, and python/clu iterators

Those are implementation details. What's actually happening in all cases is my definition.

> also could you please answer my request for clarification in

Yes, your examples or the 5 million other implementations of event loops. You forgot to add gtk's for example :)

> in the mac os 8 documentation

... and I see no mention of stacks on Wikipedia:

https://en.wikipedia.org/wiki/Cooperative_multitasking

Which lumps in both the explicit event loop style and the syntactic sugar that got added later.

We could throw definitions around till kingdom come like this. And it's not the exact definition that's my problem.

1 comments

thanks! but here we were discussing specifically the distinction between the approaches to concurrency that require you to explicitly structure your code around yield points, like async/await, and the kinds that don't, like preemptive multitasking and what i'm calling cooperative multitasking. this is unnecessarily difficult to discuss coherently if you insist on applying the term 'cooperative multitasking' indiscriminately to both, which i've shown above is in violation of established usage, and refusing to suggest an alternative term

i'll see if i can flesh out the wikipedia article a bit

Where did I mix preemptive and cooperative multitasking?

And why do you think that in the case of an explicit event loop you don't have to yield? You do have to, and have to sort out some way to continue on your own. Which makes the new 'syntactic sugar' approaches much easier of course. Doesn't mean the principle isn't the same and they don't deserve the same name.

you didn't and i don't