Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Execution of completion handler on completion of asynchronous operation

Let Args... be the argument types of the completion signature Signature and let N be sizeof...(Args). Let i be in the range [0,N). Let T[sub i] be the ith type in Args... and let t[sub i] be the ith completion handler argument associated with T[sub i].

Let f be a function object, callable as f(), that invokes completion_handler as if by completion_handler(forward<T[sub 0>(t[sub 0]), ..., forward<T[sub N-1]>(t[sub N-1]))].

If an asynchonous operation completes immediately (that is, within the thread of execution calling the initiating function, and before the initiating function returns), the completion handler shall be submitted for execution as if by performing ex2.post(std::move(f), alloc2). Otherwise, the completion handler shall be submitted for execution as if by performing ex2.dispatch(std::move(f), alloc2).


PrevUpHomeNext