Hacker News new | ask | show | jobs
by mkishi 1525 days ago
That seems to be the same kind of confusion I ran into the last time I tried to do async in Zig. I also had trouble figuring out who was responsible for keeping track of async frames.

The details are not fresh, but it went something like: if a function called an async function like so `the_frame = async foo();`, you couldn't really reliably `resume the_frame;` unless you were responsible for all suspend points hit inside `foo`. If `foo` tried to call some other function `bar` you had no idea had a suspend point, you couldn't resume the frame anymore since you'd need to resume the inner frame instead.

So, yeah, they were colorless as in you could call any function you wanted and they don't advertise suspend points or async usage, but they are actually colorful inside and calling the wrong color breaks things.