samples/reentrant/src/org/apidesign/reentrant/CriticalSectionReentrant.java
changeset 210 acf2c31e22d4
parent 209 1c999569643b
     1.1 --- a/samples/reentrant/src/org/apidesign/reentrant/CriticalSectionReentrant.java	Sat Jun 14 10:04:51 2008 +0200
     1.2 +++ b/samples/reentrant/src/org/apidesign/reentrant/CriticalSectionReentrant.java	Sat Jun 14 10:04:53 2008 +0200
     1.3 @@ -5,13 +5,13 @@
     1.4  
     1.5  public class CriticalSectionReentrant<T extends Comparable<T>> implements CriticalSection<T> {
     1.6      private T pilot;
     1.7 -    private AtomicInteger cnt = new AtomicInteger();
     1.8      
     1.9      public void assignPilot(T pilot) {
    1.10          this.pilot = pilot;
    1.11      }
    1.12  
    1.13      // BEGIN: reentrant.merge.int
    1.14 +    private AtomicInteger cnt = new AtomicInteger();
    1.15      public int sumBigger(Collection<T> args) {
    1.16          T pilotCopy = this.pilot;
    1.17          int own = doCriticalSection(args, pilotCopy);