分享方式:


task_options 類別 (並行執行階段)

代表可用來建立工作的選項。

語法

class task_options;

成員

公用建構函式

名稱 描述
task_options::task_options 建構函式 (並行執行時間) 已多載。 工作建立選項的預設清單

公用方法

名稱 描述
task_options::get_cancellation_token 方法 (並行執行時間) 傳回取消語彙基元
task_options::get_continuation_coNtext 方法 (並行執行時間) 傳回接續內容
task_options::get_scheduler 方法 (並行執行時間) 傳回排程器
task_options::has_cancellation_token 方法 (並行執行時間) 表示使用者是否已指定取消語彙基元
task_options::has_scheduler 方法 (並行執行時間) 表示使用者是否已指定排程器
task_options::set_cancellation_token 方法 (並行執行時間) 設定選項中的指定語彙基元
task_options::set_continuation_coNtext 方法 (並行執行時間) 設定選項中的指定接續內容

繼承階層架構

task_options

需求

標頭: ppltasks.h

命名空間: concurrency

task_options::get_cancellation_token 方法 (並行執行時間)

傳回取消語彙基元

cancellation_token get_cancellation_token() const;

傳回值

task_options::get_continuation_coNtext 方法 (並行執行時間)

傳回接續內容

task_continuation_context get_continuation_context() const;

傳回值

task_options::get_scheduler 方法 (並行執行時間)

傳回排程器

scheduler_ptr get_scheduler() const;

傳回值

task_options::has_cancellation_token 方法 (並行執行時間)

表示使用者是否已指定取消語彙基元

bool has_cancellation_token() const;

傳回值

task_options::has_scheduler 方法 (並行執行時間)

表示使用者是否已指定排程器

bool has_scheduler() const;

傳回值

task_options::set_cancellation_token 方法 (並行執行時間)

設定選項中的指定語彙基元

void set_cancellation_token(cancellation_token _Token);

參數

_Token

task_options::set_continuation_coNtext 方法 (並行執行時間)

設定選項中的指定接續內容

void set_continuation_context(task_continuation_context _ContinuationContext);

參數

_ContinuationContext

task_options::task_options 建構函式 (並行執行時間)

工作建立選項的預設清單

task_options();

task_options(
    cancellation_token _Token);

task_options(
    task_continuation_context _ContinuationContext);

task_options(
    cancellation_token _Token,
    task_continuation_context _ContinuationContext);

template<typename _SchedType>
task_options(
    std::shared_ptr<_SchedType> _Scheduler);

task_options(
    scheduler_interface& _Scheduler);

task_options(
    scheduler_ptr _Scheduler);

task_options(
    const task_options& _TaskOptions);

參數

_SchedType

_Token

_ContinuationContext

_Scheduler

_TaskOptions

另請參閱

concurrency 命名空間