Consider an application with distinct sets of active and passive threads, where we want to block the passive threads until every active thread has given per-mission for the passive threads to proceed. A Count Down Latchen capsulates a counter, initialized to the number n of active threads. An active thread gives permission for the passive threads to run by calling count Down(), which decrements the counter. Each passive thread calls a wait(), which blocks the thread until the counter reaches zero (Fig.8.14).Provide a Count Down Latch implementation. Do not worry about reusing the Count Down Latch object.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here