| ||||
Copyright 1999 Sams Publishing |
|
Summary |
As you build larger applications in Java, you will sometimes need to specify limits as to how long you want one thread to wait for a certain condition to be met. Because the wait() method returns when notified and returns when it times out, steps need to be taken to keep track of how much more time (if any) should be spent waiting for the condition to be met. In this chapter, I showed you a technique for doing this by calculating an ending time before waiting, and then waiting again if this time has not yet been reached. |
| |||
Toc |