std::launch
| Defined in header <future>
|
||
| enum class launch : /* unspecified */ { async = /* unspecified */, |
(since C++11) | |
Specifies the launch policy for a task executed by the std::async function. std::launch is an enumeration used as BitmaskType.
The following constants denoting individual bits are defined by the standard library:
| Constant | Explanation |
std::launch::async
|
a new thread is launched to execute the task asynchronously |
std::launch::deferred
|
the task is executed on the calling thread the first time its result is requested (lazy evaluation) |
In addition, implementations are allowed to:
- define additional bits and bitmasks to specify restrictions on task interactions applicable to a subset of launch policies, and
- enable those additional bitmasks for the first (default) overload of std::async.
[edit] See also
| (C++11) |
runs a function asynchronously (potentially in a new thread) and returns a std::future that will hold the result (function template) |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
