February 2014
Beginner
1248 pages
62h 25m
English
• You can implement a shared buffer yourself using the synchronized keyword and Object methods wait, notify and notifyAll (p. 988).
• A thread can call Object method wait to release an object’s monitor lock, and wait in the waiting state while the other threads try to enter the object’s synchronized statement(s) or method(s).
• When a thread executing a synchronized statement (or method) completes or satisfies the condition on which another thread may be waiting, it can call Object method notify (p. 988) to allow a waiting thread to transition to the runnable state. At this point, the thread that was transitioned can attempt to reacquire the ...
Read now
Unlock full access