futures and related asynchronous combinators
Eugene Wissner via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Sun Mar 27 01:16:22 PDT 2016
On Sunday, 27 March 2016 at 07:16:53 UTC, Vlad Levenfeld wrote:
> https://github.com/evenex/future/
>
> I've been having to do a lot of complicated async work lately
> (sometimes multithreaded, sometimes not), and I decided to
> abstract a some patterns out and unify them with a little bit
> of formalism borrowed from functional languages. I've aimed to
> keep things as simple as possible while providing a full spread
> of functionality. This has worked well for me under a variety
> of use-cases, but YMMV of course.
>
> Anyway I've occasionally seen people on IRC asking about
> futures, so I thought I'd share and make this announcement.
>
> This lib depends on another lib of mine (for tagged unions and
> related things) which might not appeal to some but if there is
> demand for futures sans dependencies I can always go back and
> manually inline some of the templates.
>
> TL;DR:
>
> auto x = async!((y,z) => y + z)(1,2);
> x.await;
> assert(x.result.success = 3);
Hi Vlad,
Are you intend to open source other parts of your work?
Can I ask what are you using for your async stuff: libasync,
vibe, asynchronous or something self written?
More information about the Digitalmars-d-announce
mailing list