Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-04-11 12:30:48

Frank Mori Hess:

> Would support for releasing a future's reference count be acceptable in
> this
> scheme? That is, something like
> future<void> fire();
> //...
> {
> future<void> forget = fire();
> forget.release(); // promise is not cancelled when forget destructs
> }

Good point about fire and forget tasks. I'm not sure I have a satisfactory
answer yet. There is no way to distinguish a result-only task from a
perform-side-effects task automatically, so the user must have some way to
say which is which.

On the other hand, a newly created promise doesn't have a cancel handler by
default, so whoever installs the cancel handler (the executor) can easily
take an argument that disables said installation.

Boost list run by bdawes at, gregod at, cpdaniel at, john at