[cpp-threads] Asynchronous Function Proposal
Peter Dimov
pdimov at mmltd.net
Mon Jun 1 14:36:09 BST 2009
Beman Dawes:
> As Herb pointed out, this makes it look like we have serious problems with
> the current future interface and/or the current thread interface. I very
> much want to hear what Howard, Anthony, and others with a deep
> understanding of standard library threads/futures/promises have to say
> about these issues.
I've pointed out many times that the thread class needs "proper" join
semantics, including try_join and timed_join.
> I also share Herb's concern about the apparent complexity of an eight
> function interface. We can do better than that!
This is an implementation detail. It's possible to collapse the eight
functions into two by using
concept AsyncPolicy<typename T> {};
async( F&& f, Args&&... args );
async( AsyncPolicy policy, F&& f, Args&&... args );
More information about the cpp-threads
mailing list