Export (0) Print
Expand All

Object.notify Method

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


public void notify()

Called

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.
    this.notify();
}

Community Additions

ADD
Show:
© 2014 Microsoft