Advertisement
|
The following is a fragment of source code that I jotted down during Alex Miller's presentation at the JUG yesterday:
lock.writeLock().lock()
try {
data[index] = result;
pixelComplete++;
} finally {
lock.writeLock().unlock();
}
Today's quiz: reconstruct the original program of which this fragment is a part.
Bonus round: here are some other words in my notes, make sense of them:
jsr166y
encapsulate shared state
handout
no slides ReentrantLock
all code
AtomicInteger wait, notify ForkJoin
Lock Condition
newCondition()
tryLock() ReadWriteLock
SETA Future readLock
writeLock
Read: Friday Java Quiz: Source Reconstruction