Object.notify Method

Releases the hold on an object that has called a wait method on this object.

public void notify()

Run On



The following example locks an object and then releases it.

public void doWork()
    // Perform some actions.

    this.setTimeOut(identifierstr(workerFunction), 0);
    this.wait(); // Lock and wait for notify to be called.

public void workerFunction()
    // Perform some actions.

    // Work is done; unlock the doWork method.

See Also

Object Class

Object.notifyAll Method