Boost logo

Threads-Devel :

Subject: Re: [Threads-devel] MVars in C++
From: Trin Trin (trin.cz_at_[hidden])
Date: 2010-11-18 09:38:53

On Thu, Nov 18, 2010 at 2:54 PM, Frank Mori Hess <frank.hess_at_[hidden]>wrote:

> Hash: SHA1
> On Thursday 18 November 2010, Trin Trin wrote:
> > Hi Boosters,
> >
> > recently I became interested in Boost and I've also been studying your
> > thread synchronization primitives. I was very surprised, that nobody
> > implemented MVars before. It is a very powerful synchronization
> > primitive.
> At a glance, it looks very similar to futures (which are part of the
> upcoming standard, and I think have been added to Boost.Thread). Is there
> something I'm missing?

It seems to me that promise/future are only designed to handle a single
task. Much like Deferred in python-twisted. I don't see a (reasonably
readable) possibility to use promise/future to implement multi-producer -
multi-consumer scenario. The MVars sure can be used to implement
promise/future, but I don't see an easy way the other way around.


> Version: GnuPG v1.4.9 (GNU/Linux)
> iEYEARECAAYFAkzlMAoACgkQ5vihyNWuA4XJogCfVe5tA4zZbXqxDMnwyxkRzzYS
> BXMAn1VoKlo2PTMAiq0+6frIWit4G1sW
> =IpPP
> _______________________________________________
> threads-devel mailing list
> threads-devel_at_[hidden]

Threads-Devel list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at