orc.runtime.regions
Class Region

java.lang.Object
  extended by 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
           
 
Constructor Summary
Region()
           
 
Method Summary
 void add(Region r)
           
 void add(Token t)
           
 void close(Token closer)
           
 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.
 void putContainedTokens(java.util.Set<Token> acc)
           
protected abstract  void reallyClose(Token closer)
           
 void remove(Region r, Token closer)
           
 void remove(Token closer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

closed

protected boolean closed
Constructor Detail

Region

public Region()
Method Detail

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)