Partager via


Object.NotifyAll Method

Definition

Wakes up all threads that are waiting on this object's monitor.

[Android.Runtime.Register("notifyAll", "()V", "")]
public void NotifyAll ();
[<Android.Runtime.Register("notifyAll", "()V", "")>]
member this.NotifyAll : unit -> unit
Attributes

Exceptions

if the thread calling this method is not the owner of this object's monitor.

Remarks

Wakes up all threads that are waiting on this object's monitor. A thread waits on an object's monitor by calling one of the wait methods.

The awakened threads will not be able to proceed until the current thread relinquishes the lock on this object. The awakened threads will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened threads enjoy no reliable privilege or disadvantage in being the next thread to lock this object.

This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.

Java documentation for java.lang.Object.notifyAll().

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

See also