Future Polling

Is there yet a std lib way of polling if a future is complete without having to do a blocking Io.Future(type).wait()?
Also, I am aware of the atomic flag checking before it could be brought into the play here. (Was just wondering if I am missing something obvious here.)

AFAICT no, not directly, but passing in an Event and just doing a defer set() at the top will probably do what you need.

What problem are you trying to solve? Might be something better that can be suggested.


So this is a mock code now imagine this with multiple types of future–say a render unit that waits on a texture load before working ahead. But it can’t await() or else the app would lag the main loop. And it just seems extensive to have an atomic flag per future issued.