Пример #1
0
 /**
  * Create a Promise timer that throws a TimeoutException after a given timeout.
  *
  * <p>The returned Promise is usually combined with other Promises.
  *
  * @param delay The delay (expressed with the corresponding unit).
  * @param unit The Unit.
  * @return a promise without a real value
  */
 public static <A> Promise<scala.Unit> timeout(long delay, TimeUnit unit) {
   return FPromiseHelper.timeout(delay, unit);
 }
Пример #2
0
 /**
  * Create a Promise that is redeemed after a timeout.
  *
  * @param message The message to use to redeem the Promise.
  * @param delay The delay (expressed with the corresponding unit).
  * @param unit The Unit.
  */
 public static <A> Promise<A> timeout(A message, long delay, TimeUnit unit) {
   return FPromiseHelper.timeout(message, delay, unit);
 }