orc.runtime.regions
Class Region
java.lang.Object
orc.runtime.regions.Region
- Direct Known Subclasses:
- Execution, GroupRegion, SemiRegion
public abstract class Region
- extends java.lang.Object
Regions are used to track when some (sub-)computation terminates.
Currently the region methods must be synchronized, because tokens
can be killed by independent threads (such as site calls in progress),
triggering an update on the region. Maybe we should have a separate
queue deal with dead tokens so this isn't necessary.
Field Summary |
protected boolean |
closed
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
closed
protected boolean closed
Region
public Region()
add
public final void add(Token t)
add
public final void add(Region r)
remove
public void remove(Token closer)
remove
public void remove(Region r,
Token closer)
close
public final void close(Token closer)
reallyClose
protected abstract void reallyClose(Token closer)
close
public final void close(TokenTracer.StoreTrace store,
Token closer)
- Used when tracing, to both close the region and trace the "choking" of
all tokens within the region. If you're not tracing, it's more efficient
to call
close(Token)
.
- Parameters:
store
- The TokenTracer.StoreTrace
which triggered the closing.
putContainedTokens
public void putContainedTokens(java.util.Set<Token> acc)