Hacker News new | past | comments | ask | show | jobs | submit login

I'm currently playing around with a Vulkan toy renderer and use coroutines for some parts and I have to say it's a perfect match: many Vulkan apis are async, they return immediately but give you an option to signal a fence that you can query from the CPU.

Without coroutines, this is where I would have to roll some callbacksmechanism or statementmachine, but with coroutines, I can simply suspend the callstack and resume once the fence is signaled.

Its very neat.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: