| ||||
Copyright 1999 Sams Publishing |
|
Summary |
BooleanLock can be used to simplify inter-thread communication. It nicely encapsulates the error-prone complexity of the wait/notify mechanism. Another useful application of BooleanLock is to provide an interruptible alternative to control access to synchronized blocks of code. TransitionDetector can be used when the fact that the internal value has changed is important, regardless of whether it has been changed back to its original value. |
| |||
Toc |