
11 Apr
2008
11 Apr
'08
4:30 p.m.
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.