|
Boost : |
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-04-10 09:36:50
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 09 April 2008 22:17 pm, Peter Dimov wrote:
> I no longer like future<>::cancel. :-) Have you considered the alternative
> of automatically invoking the cancel handler when no futures remain? This
> requires that a promise and a future be created at once:
>
> pair<promise,future> pc = create_channel();
Would that really be necessary? Presumably, you would only want it to call
the cancel handler when the future reference count makes the transition from
1 to 0, not potentially multiple times while the reference count sits at 0.
> or, if empty futures are allowed:
>
> future f; // empty/detached
> promise p(f); // attach p to f
- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFH/hfz5vihyNWuA4URAhHvAJ4vohVgFRV3DeMVEt2fJrYSmYOzOwCgtMv/
8tdNg8GH5nAnp/25GlewS9g=
=S9UK
-----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