choice::choice 建構函式

建構 choice 傳訊區塊。

explicit choice(
   _Type _Tuple
);

choice(
   Scheduler& _PScheduler,
   _Type _Tuple
);

choice(
   ScheduleGroup& _PScheduleGroup,
   _Type _Tuple
);

choice(
   choice && _Choice
);

參數

  • _Tuple
    選擇的 tuple 之來源。

  • _PScheduler
    在其中排程 choice 傳訊區塊之傳播工作的 Scheduler 物件。

  • _PScheduleGroup
    在其中排程 choice 傳訊區塊之傳播工作的 ScheduleGroup 物件。排程群組會隱含所用的 Scheduler 物件。

  • _Choice
    為複製來源的 choice 傳訊區塊。請注意,原始物件已損毀,使其成為移動建構函式。

備註

如果您不指定 _PScheduler 或 _PScheduleGroup 參數,執行階段會使用預設排程器。

移動建構並不是在鎖定之下執行的,也就是說,使用者必須確定沒有移動時沒有任何輕量工作正在進行。否則,可能發生許多競爭情形,導致例外狀況或不一致的狀態。

需求

標頭: agents.h

Namespace: 並行存取

請參閱

參考

choice 類別

Scheduler 類別

ScheduleGroup 類別