Class LongProcessHandle<T>

java.lang.Object
org.omegat.core.threads.LongProcessHandle<T>

public final class LongProcessHandle<T> extends Object
A handle returned to callers when a long-running task is started. Provides a single, consistent way to cancel and to await completion.
  • Method Details

    • token

      public CancellationToken token()
    • completion

      public CompletableFuture<T> completion()
    • cancel

      public void cancel()
      Requests cancellation cooperatively and interrupts the worker thread.