Barrier.RemoveParticipants(Int32) 方法

定義

通知 Barrier,表示會減少一些參與者。

public:
 void RemoveParticipants(int participantCount);
public void RemoveParticipants (int participantCount);
member this.RemoveParticipants : int -> unit
Public Sub RemoveParticipants (participantCount As Integer)

參數

participantCount
Int32

要從屏障中移除的其他參與者數目。

例外狀況

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

參與者總數小於指定的 participantCount

屏障已經有 0 個參與者。

-或-

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

-或-

目前的參與者計數小於指定的 participantCount。

備註

如果 participantCount 參與者已經在等候屏障,此移除會滿足屏障,則會執行後續階段動作,而且所有參與者都會被喚醒,就像已移除此參與者已成功達到屏障一樣。

適用於

另請參閱