Open hkaiser opened 6 years ago
I can't quite picture the useful scenarios, but I don't have a strong objection either. I wouldn't like to assume it can always be implemented with no cost, though. Obviously it could be always implemented via a continuation, but to do it cheaply you'd need to maintain some sort of knowledge that there is a mismatch between the shared state and what the future wants to do with the data. If it did require a continuation then it could be a pretty high cost implicit operation.
We have implemented it at no cost in HPX. It's a simple downcast on the shared state.
Setting this as V1.5; we will discuss this and come to a conclusion before Rapperswil, but not before the mailing deadline due to time constraints.
@brycelelbach that's fine. We have a whole list of small helper facilities we can add at that point, then.
In HPX we have added an implicit constructor
future<void>::future(future<T> &&)
(andshared_future<void>::shared_future(shared_future<T>)
) allowing to convert any future to a correspondingFuture<void>
. This has proven to be very handy in many scenarios.