public void run()
        {
            if (solution.isSet() || seen.putIfAbsent(pos, true)!=null)
            {
                return;
            }
            
            if (puzzle.isGoal(pos))
            {
                solution.setValue(this);
            }
            else {
                for (M m: puzzle.legalMoves(pos))
                {
                    exec.execute(newTask(puzzle.move(pos, m), m, this));
                }
            }
            
        }