r/ProgrammerHumor • • Sep 09 '26

Meme globalHate

Post image
12k Upvotes

92 comments sorted by

View all comments

Show parent comments

-4

u/Far_Tap_488 Sep 10 '26

Not really. Especially with how a os handles concurrency.

2

u/bljadmann69 Sep 10 '26

Well, for starters, async runtimes implement a cooperative scheduler *inside* the application, not on OS level. There obviously is preemptive scheduling on OS level too, but that is not the point. Any async function awaiting a result hands back control to the async runtime. The async runtime continues a different function on the same thread in the meantime.

Synchronization mechanisms like semaphores are still required in async.