Implement async/await using Fiber
Jacob Carlborg via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu May 19 23:40:42 PDT 2016
On 2016-05-20 04:14, Yuxuan Shui wrote:
> Hmm... This could work. But I'm not satisfied with this solution. What
> if I have multiple yield sites in the fiber, and each have different
> return types?
>
> Maybe I should use a Variant?
I think you can view "yield" as a form of "return". If you cannot return
different types from a function (without it being a template) it would
be weird if you could yield different types.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list