3 ms·
You can do DoXxx() using DoXxxAsync() by calling wait() on the future it returns. No duplicated code necessary.
by xfer 9y ago
You can do DoXxx() using DoXxxAsync() by calling wait() on the future it returns. No duplicated code necessary.
- infogulch 9y agoIt's nice that that'll work but it's... kinda gross. Can it call wait() automatically via some auto type conversion? Ideally in a synchronous context it would call wait(), and in an async context it would automatically annotate await (and you could always override by calling wait() manually).