Java.Lang.Object.NotifyAll Method
Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

Syntax

[Android.Runtime.Register("notifyAll", "()V", "")]
public void NotifyAll ()

See Also

Object.Notify
Object.Wait
Object.Wait(long)
Object.Wait(long, System.Int32)
Thread

Exceptions

TypeReason
Java.Lang.IllegalMonitorStateExceptionif the thread calling this method is not the owner of this object's monitor.

Remarks

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up. The threads will not run immediately. The thread that called notify() has to release the object's monitor first. Also, the threads still have to compete against other threads that try to synchronize on the same object.

This method can only be invoked by a thread which owns this object's monitor. A thread becomes owner of an object's monitor

  • by executing a synchronized method of that object;
  • by executing the body of a synchronized statement that synchronizes on the object;
  • by executing a synchronized static method if the object is of type Class.

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1