18.5
Example
DOCUMENTATION COMMENTS
/**
 * Causes a thread to wait until it is notified or the
 * specified timeout expires. 

 * The method wait(millis) can be called only by
 * the thread that is the owner of the current object s
 * monitor lock.
 *
 * @param
millis
the maximum time to wait,
 *
in milliseconds
 * @exception
IllegalMonitorStateException If the
 *
current thread is not the owner
 *
of the Object s monitor lock.
 * @exception
InterruptedException Another thread has
 *
interrupted this thread.
 */
public final native void wait(long millis)
throws InterruptedException;
/**
 * More accurate wait.
 * The method wait(millis, nanos) can be called only
 * by the thread that is the owner of the current
 * object s monitor lock.
 *
 * @param millis
the maximum time to wait,
 *
in milliseconds
 * @param nano
additional time to wait,
 *
in nanoseconds
 *
(range 0 999999)
 * @exception
IllegalMonitorStateException If the
 *
current thread is not the owner
 *
of the Object s monitor lock.
 * @exception
InterruptedException Another thread has
 *
interrupted this thread.
 */
public final void wait(long millis, int nanos)
throws InterruptedException
{
if (nanos >= 500000 || (nanos != 0 && millis==0))
timeout++;
wait(timeout);
}
/**
 * Causes a thread to wait forever until it is notified.
 * 

 * The method wait() can be called only by the
 * thread that is the owner of the current object s
 * monitor lock.
 *
426






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved