次の方法で共有


CyclicBarrier.Reset Method

Definition

Resets the barrier to its initial state.

[Android.Runtime.Register("reset", "()V", "GetResetHandler")]
public virtual void Reset ();
[<Android.Runtime.Register("reset", "()V", "GetResetHandler")>]
abstract member Reset : unit -> unit
override this.Reset : unit -> unit
Attributes

Remarks

Resets the barrier to its initial state. If any parties are currently waiting at the barrier, they will return with a BrokenBarrierException. Note that resets <em>after</em> a breakage has occurred for other reasons can be complicated to carry out; threads need to re-synchronize in some other way, and choose one to perform the reset. It may be preferable to instead create a new barrier for subsequent use.

Java documentation for java.util.concurrent.CyclicBarrier.reset().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to