SysTutorials

Linux Manual Pages › Section 3

stdlaunch(3)

std::launch - std::launch

Synopsis

Defined in header <future>
enum class launch : /* unspecified */ {
    async = /* unspecified */,
    deferred = /* unspecified */,            (since C++11)
    /* implementation-defined */
};

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:

See also

async runs a function asynchronously (potentially in a new thread) and returns a std::future that will hold the result         (function template) (C++11)