Package gnu.mapping

Class RunnableClosure<T>

java.lang.Object
gnu.mapping.RunnableClosure<T>
All Implemented Interfaces:
Runnable, Callable<T>

public class RunnableClosure<T> extends Object implements Callable<T>, Runnable
  • Constructor Details

    • RunnableClosure

      public RunnableClosure(Procedure action)
    • RunnableClosure

      public RunnableClosure(Procedure action, gnu.kawa.io.InPort in, gnu.kawa.io.OutPort out, gnu.kawa.io.OutPort err)
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getCallContext

      public final CallContext getCallContext()
      Get the CallContext we use for this Thread.
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getResult

      public Object getResult() throws Throwable
      Get the result of running this Runnable. The result is a value or a thrown exception. Should be called after {#code run} finishes.
      Throws:
      Throwable
    • call

      public T call() throws Exception
      Specified by:
      call in interface Callable<T>
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class Object