@@ -39,6 +39,9 @@ public class CFlowCounter { | |||
public void dec() { | |||
flowHeightHandler.dec(); | |||
if (!flowHeightHandler.isNotZero()) { | |||
flowHeightHandler.removeThreadCounter(); | |||
} | |||
} | |||
public boolean isValid() { |
@@ -81,7 +81,11 @@ public class CFlowStack { | |||
} | |||
public void pop() { | |||
getThreadStack().pop(); | |||
Stack s = getThreadStack(); | |||
s.pop(); | |||
if (s.isEmpty()) { | |||
stackProxy.removeThreadStack(); | |||
} | |||
} | |||
public Object peek() { |
@@ -18,4 +18,5 @@ public interface ThreadCounter { | |||
public void inc(); | |||
public void dec(); | |||
public boolean isNotZero(); | |||
public void removeThreadCounter(); | |||
} |
@@ -71,4 +71,8 @@ public class ThreadCounterImpl11 implements ThreadCounter { | |||
return getThreadCounter().value!=0; | |||
} | |||
public void removeThreadCounter() { | |||
// TODO | |||
} | |||
} |
@@ -18,5 +18,6 @@ import java.util.Stack; | |||
public interface ThreadStack { | |||
public Stack getThreadStack(); | |||
public void removeThreadStack(); | |||
} |
@@ -23,6 +23,9 @@ public class ThreadStackFactoryImpl implements ThreadStackFactory { | |||
public Stack getThreadStack() { | |||
return (Stack)get(); | |||
} | |||
public void removeThreadStack() { | |||
this.remove(); | |||
} | |||
} | |||
public ThreadStack getNewThreadStack() { | |||
@@ -38,6 +41,10 @@ public class ThreadStackFactoryImpl implements ThreadStackFactory { | |||
return (Counter)get(); | |||
} | |||
public void removeThreadCounter() { | |||
this.remove(); | |||
} | |||
public void inc() { getThreadCounter().value++; } | |||
public void dec() { getThreadCounter().value--; } | |||
public boolean isNotZero() { return getThreadCounter().value!= 0; } |
@@ -52,4 +52,8 @@ public class ThreadStackImpl11 implements ThreadStack { | |||
return cached_stack; | |||
} | |||
public void removeThreadStack() { | |||
// TODO | |||
} | |||
} |