ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/LinkedAsyncAction.java
(Generate patch)

Comparing jsr166/src/test/loops/LinkedAsyncAction.java (file contents):
Revision 1.6 by jsr166, Sun Nov 18 18:03:11 2012 UTC vs.
Revision 1.7 by jsr166, Sun Nov 25 21:37:28 2012 UTC

# Line 39 | Line 39 | import java.util.concurrent.atomic.*;
39   *
40   * <pre>
41   * class GraphVisitor extends LinkedAsyncAction {
42 < *    final Node node;
43 < *    GraphVisitor(GraphVistor parent, Node node) {
44 < *      super(parent); this.node = node;
45 < *    }
46 < *    protected void compute() {
47 < *      if (node.mark.compareAndSet(false, true)) {
48 < *         for (Edge e : node.edges()) {
49 < *            Node dest = e.getDestination();
50 < *            if (!dest.mark.get())
51 < *               new GraphVisitor(this, dest).fork();
52 < *         }
53 < *         visit(node);
54 < *      }
55 < *      complete();
42 > *   final Node node;
43 > *   GraphVisitor(GraphVistor parent, Node node) {
44 > *     super(parent); this.node = node;
45 > *   }
46 > *   protected void compute() {
47 > *     if (node.mark.compareAndSet(false, true)) {
48 > *       for (Edge e : node.edges()) {
49 > *         Node dest = e.getDestination();
50 > *         if (!dest.mark.get())
51 > *           new GraphVisitor(this, dest).fork();
52 > *       }
53 > *       visit(node);
54 > *     }
55 > *     complete();
56   *   }
57   * }
58   * </pre>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines