orc.lib.util
Class ThreadSite

java.lang.Object
  extended by orc.runtime.values.Value
      extended by orc.runtime.sites.Site
          extended by orc.runtime.sites.EvalSite
              extended by orc.lib.util.ThreadSite
All Implemented Interfaces:
Callable

public class ThreadSite
extends EvalSite

Wrap a site call in a (pooled) thread. This is useful if you have a Java site which may be uncooperative. Currently we do not allow you to create non-pooled threads since we want to place a strict bound on thread resource usage per engine.

Author:
quark

Field Summary
 
Fields inherited from class orc.runtime.values.Value
futureNotReady
 
Constructor Summary
ThreadSite()
           
 
Method Summary
 java.lang.Object evaluate(Args args)
           
static Site makeThreaded(Site site)
           
 
Methods inherited from class orc.runtime.sites.EvalSite
callSite
 
Methods inherited from class orc.runtime.sites.Site
accept, createCall, type
 
Methods inherited from class orc.runtime.values.Value
forceArg, forceCall, signal, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadSite

public ThreadSite()
Method Detail

evaluate

public java.lang.Object evaluate(Args args)
                          throws TokenException
Specified by:
evaluate in class EvalSite
Throws:
TokenException

makeThreaded

public static Site makeThreaded(Site site)