名前空間
変種
操作

std::launch

提供: cppreference.com
< cpp‎ | thread

Defined in header <future>
enum class launch : /* unspecified */ {

    async =    /* unspecified */,
    deferred = /* unspecified */,
    /* implementation-defined */

};
(C++11およびそれ以降)
std::async機能によって実行タスクの起動ポリシーを指定します。 std::launchBitmaskType(列挙型、整数、またはbitsetの)です.
Original:
Specifies the launch policy for a task executed by the std::async function. std::launch is a BitmaskType (enumeration, integer, or bitset).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
個々のビットを表す以下の定数は標準ライブラリで定義されています
Original:
The following constants denoting individual bits are defined by the standard library:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
定数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
std::launch::async
新しいスレッドが非同期にタスクを実行するために起動されます
Original:
a new thread is launched to execute the task asynchronously
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::launch::deferred
タスクは、呼び出し元のスレッドで、その結果が要求されたときに、最初の時間(遅延評価)が実行されます
Original:
the task is executed on the calling thread the first time its result is requested (lazy evaluation)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
加えて、実装は次のように許可されています
Original:
In addition, implementations are allowed to:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • 起動ポリシーのサブセットに適用可能なタスクの操作に制限を指定するために追加のビットとビットマスクを定義します
    Original:
    define additional bits and bitmasks to specify restrictions on task interactions applicable to a subset of launch policies, and
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • std::asyncの最初の(デフォルトの)過負荷のために、これらの追加のビットマスクを有効に.
    Original:
    enable those additional bitmasks for the first (default) overload of std::async.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[編集] も参照してください

(C++11)
非同期関数を実行します(潜在的に新しいスレッドで)、その結果を保持するstd::futureを返します
Original:
runs a function asynchronously (potentially in a new thread) and returns a std::future that will hold the result
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数テンプレート) [edit]