[cpp-threads] Asynchronous Function Proposal

Herb Sutter hsutter at microsoft.com
Mon Jun 1 17:33:31 BST 2009


> > 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 );

Again, I'd prefer simplifying it down to exactly one:

  async( F&& f, AsyncPolicy policy = /* default */ );

Herb




More information about the cpp-threads mailing list