congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Joinable.join
Code IndexAdd Tabnine to your IDE (free)

How to use
join
method
in
com.obsidiandynamics.worker.Joinable

Best Java code snippets using com.obsidiandynamics.worker.Joinable.join (Showing top 3 results out of 315)

origin: com.obsidiandynamics.fulcrum/fulcrum-worker

/**
 *  Waits until this concurrent entity terminates.
 *  
 *  @throws InterruptedException If the thread is interrupted.
 */
default void join() throws InterruptedException {
 join(0);
}

origin: com.obsidiandynamics.fulcrum/fulcrum-worker

/**
 *  Waits until this concurrent entity terminates.<p>
 *  
 *  This variant suppresses an {@link InterruptedException} and will re-assert the interrupt 
 *  prior to returning.
 *  
 *  @param timeoutMillis The time to wait. {@code 0} means wait forever.
 *  @return True if this entity was terminated, false if the wait timed out.
 */
default boolean joinSilently(long timeoutMillis) {
 try {
  return join(timeoutMillis);
 } catch (InterruptedException e) {
  Thread.currentThread().interrupt();
  return false;
 }
}
origin: com.obsidiandynamics.fulcrum/fulcrum-worker

 /**
  *  Helper for joining on all provided {@link Joinable} instances, using {@code timeoutMillis} as
  *  the upper bound on the join timeout.
  *  
  *  @param timeoutMillis The time to wait. {@code 0} means wait forever.
  *  @param joinables The instances to join on.
  *  @return True if <em>all</em> instances were joined on successfully within the timeout, false if at
  *          least one join timed out.
  *  @throws InterruptedException If the thread is interrupted.
  */
 static boolean joinAll(long timeoutMillis, Collection<? extends Joinable> joinables) throws InterruptedException {
  final long deadline = timeoutMillis != 0 ? System.currentTimeMillis() + timeoutMillis : Long.MAX_VALUE;
  for (Joinable joinable : joinables) {
   final long remainingMillis = deadline - System.currentTimeMillis();
   if (remainingMillis > 0) {
    final boolean joined = joinable.join(timeoutMillis);
    if (! joined) return false;
   } else {
    return false;
   }
  }
  return true;
 }
}
com.obsidiandynamics.workerJoinablejoin

Javadoc

Waits until this concurrent entity terminates.

Popular methods of Joinable

  • joinSilently
    Waits until this concurrent entity terminates. This variant suppresses an InterruptedException and w
  • joinAll
    Helper for joining on all provided Joinable instances, using timeoutMillis as the upper bound on the

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now