|
|
|
|
|
by kragen
902 days ago
|
|
async/await has the advantage over cooperative multitasking that it has subroutines of different 'colors', so you don't accidentally introduce concurrency bugs by calling a function that can yield without knowing that it can yield i think it's safe to say that the number of personal computers running operating systems without preemptive multitasking is now vanishingly small as i remember it, oberon didn't support either async/await or cooperative multitasking. rather, the operating system used an event loop, like a web page before the introduction of web workers. you couldn't suspend a task; you could only schedule more work for later |
|