<< October 11, 2007 | Home | October 13, 2007 >>

Friday Java Quiz: Source Reconstruction

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
SEDA                           writeLock
Tags :