class WorkSync {

    public void apply( W work ) throws ExecutionException
    {
        // Schedule our work on the stack.
        WorkUnit<Material,W> unit = enqueueWork( work );

        // Try grabbing the lock to do all the work, until our work unit
        // has been completed.
        int tryCount = 0;
        do
        {
            tryCount++;
            checkFailure( tryDoWork( unit, tryCount, true ) );
        }
        while ( !unit.isDone() );
    }

    public  WorkSync( Material material );

}