February 2017
Intermediate to advanced
434 pages
10h 27m
English
The following exercises cover the various topics from this chapter. Most of the exercises require implementing new concurrent data structures using atomic variables and the CAS instruction. These data structures can also be solved using the synchronized statement, so it is helpful to contrast the advantages of the two approaches:
ExecutionContext class called PiggybackContext, which executes Runnable objects on the same thread that calls the execute method. Ensure that a Runnable object executing on the PiggybackContext can also call the execute method and that exceptions are properly reported.TreiberStack class, which implements a concurrent stack abstraction: class TreiberStack[T] { def push(x: T): Unit ...Read now
Unlock full access