Boost logo

Boost :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2007-03-12 17:25:27


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 12 March 2007 17:12 pm, Braddock Gaskill wrote:
> A weakness in the future<> concept, as I understand it, is that if a
> future is never set(), then the invoking thread can hang waiting for it.
> Not very RAII.
>
> The situation is much improved if future<T> and promise<T> are split,
> and promise<T> is reference counted. If the last promise<T> for a
> particular future<T> goes out of scope, than any thread waiting on the
> matching future<T> would be failed with a promise_broken exception or
> somesuch.
>
> Is this already part of the promise<T> concept?

No, at least it wasn't in the code Chris posted. I like the idea though,
thanks. I'm going to incorporate it into my code.

- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFF9cVJ5vihyNWuA4URAgLtAKCqOsWWx22RmRjofDcN0/SKM5/yiwCgtmYz
ysMas3e+R2ifsMAJTzYaP6I=
=aY5Z
-----END PGP SIGNATURE-----


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk