java.lang.Object
com.inductiveautomation.perspective.gateway.threading.BlockingWork

public class BlockingWork extends Object
  • Method Details

    • begin

      public static void begin()
      Assertion checks to see if the current thread allows blocking work. Throws if not allowed.
      Throws:
      BlockingWork.NoBlockingWorkAllowedException - if blocking work not allowed on calling thread.
    • setBlockingWorkAllowed

      public static void setBlockingWorkAllowed(boolean allowed)
    • invokeBlockingTask

      public static <E extends Throwable> void invokeBlockingTask(FragileRunnable<E> runnable) throws E
      Invokes a task that is expected to perform blocking work. Leaves the state of the thread's blocking work policy unchanged.
      Throws:
      E extends Throwable
    • wrapThreadFactory

      public static ThreadFactory wrapThreadFactory(ThreadFactory delegate)
      Wraps a thread factory to allow blocking work.