Barrier.AddParticipant 方法

定義

通知 Barrier,表示還會有一個其他參與者。

public:
 long AddParticipant();
public long AddParticipant ();
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public long AddParticipant ();
member this.AddParticipant : unit -> int64
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.AddParticipant : unit -> int64
Public Function AddParticipant () As Long

傳回

新參與者將第一次參與其中的屏障階段編號。

屬性

例外狀況

目前的執行個體已經過處置。

加入參與者會造成屏障的參與者計數超過 32,767。

-或-

此方法是從 post-phase 動作中叫用。

備註

如果屏障目前正在執行後續階段動作,則會封鎖此呼叫,直到後續階段動作完成,且屏障已移至下一個階段為止。

適用於

另請參閱