@@ -0,0 +1,724 @@
+package orc.runtime.sites;%0A%0Aimport orc.error.TokenException;%0Aimport orc.runtime.Args;%0Aimport orc.runtime.Token;%0Aimport orc.runtime.values.Value;%0A%0A/**%0A * Abstract class for partial sites whose calls may block (the Java thread). A%0A * separate thread is created for every call.%0A * %0A * @author quark%0A */%0Apublic abstract class ThreadedPartialSite extends Site %7B%0A%09public void callSite(final Args args, final Token caller) %7B%0A%09%09new Thread() %7B%0A%09%09%09public void run() %7B%0A%09%09%09%09try %7B%0A%09%09%09%09%09Value v = evaluate(args);%0A%09%09%09%09%09if (v != null)%0A%09%09%09%09%09%09caller.resume(v);%0A%09%09%09%09%09else%0A%09%09%09%09%09%09caller.die();%0A%09%09%09%09%7D catch (TokenException e) %7B%0A%09%09%09%09%09caller.error(e);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D.start();%0A%09%7D%0A%0A%09abstract public Value evaluate(Args args) throws TokenException;%0A%7D%0A

Add ThreadedPartialSite