Remix.run Logo
ethin 6 hours ago

One thing the old Zig async/await system theoretically allowed me to do, which I'm not certain how to accomplish with this new io system without manually implementing it myself, is suspend/resume. Where you could suspend the frame of a function and resume it later. I've held off on taking a stab at OS dev in Zig because I was really, really hoping I could take advantage of that neat feature: configure a device or submit a command to a queue, suspend the function that submitted the command, and resume it when an interrupt from the device is received. That was my idea, anyway. Idk if that would play out well in practice, but it was an interesting idea I wanted to try.

nine_k 5 hours ago | parent | next [-]

Can you create a thread pool consisting of one thread, and suspend / resume the thread?

RossBencina an hour ago | parent [-]

Doesn't that negate the point of using coroutines? light-weight concurrency

NooneAtAll3 6 hours ago | parent | prev [-]

what's the point of implementing cooperative "multithreading" (coroutines) with preemptive one (async)?