object AsyncCallback
- Alphabetic
- By Inheritance
- AsyncCallback
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class Barrier extends AnyRef
- final class CountDownLatch extends AnyRef
- final case class Forked[+A](await: AsyncCallback[A], isComplete: CallbackTo[Boolean]) extends Product with Serializable
- final class Mutex extends AnyRef
- final class ReadWriteMutex extends AnyRef
- final class Ref[A] extends AnyRef
- final class State extends AnyRef
- type UnderlyingRepr[+A] = (State) => ((Try[A]) => Callback) => Callback
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[A](f: ((Try[A]) => Callback) => Callback): AsyncCallback[A]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def awaitAll(as: AsyncCallback[Any]*): AsyncCallback[Unit]
- lazy val barrier: CallbackTo[Barrier]
A synchronisation aid that allows you to wait for another async process to complete.
- def cancel: AsyncCallback[Unit]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def const[A](t: Try[A]): AsyncCallback[A]
- def countDownLatch(count: Int): CallbackTo[CountDownLatch]
A synchronization aid that allows you to wait until a set of async processes completes.
- def debounce(delay: FiniteDuration): AsyncCallback[Unit]
Creates an debounce boundary.
Creates an debounce boundary.
Save it as a
val
somewhere because it relies on internal state that must be reused.- Annotations
- @inline()
- def debounce(delay: Duration): AsyncCallback[Unit]
Creates an debounce boundary.
Creates an debounce boundary.
Save it as a
val
somewhere because it relies on internal state that must be reused.- Annotations
- @inline()
- def debounceMs(delayMs: Long): AsyncCallback[Unit]
Creates an debounce boundary.
Creates an debounce boundary.
Save it as a
val
somewhere because it relies on internal state that must be reused.- Annotations
- @inline()
- def delay[A](a: => A): AsyncCallback[A]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def first[A](f: ((Try[A]) => Callback) => Callback): AsyncCallback[A]
- def fromCallbackToFuture[A](c: CallbackTo[Future[A]])(implicit ec: ExecutionContext): AsyncCallback[A]
- def fromCallbackToJsPromise[A](c: CallbackTo[Promise[A]]): AsyncCallback[A]
- def fromFuture[A](fa: => Future[A])(implicit ec: ExecutionContext): AsyncCallback[A]
- def fromJsPromise[A](pa: => Thenable[A]): AsyncCallback[A]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def init[A, B](f: ((Try[B]) => Callback) => CallbackTo[A]): CallbackTo[(A, AsyncCallback[B])]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lazily[A](f: => AsyncCallback[A]): AsyncCallback[A]
Callback that isn't created until the first time it is used, after which it is reused.
- def mutex: CallbackTo[Mutex]
Creates a new (non-reentrant) mutex.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def never[A]: AsyncCallback[A]
AsyncCallback that never completes.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def promise[A]: CallbackTo[(AsyncCallback[A], (Try[A]) => Callback)]
Create an AsyncCallback and separately provide the completion function.
Create an AsyncCallback and separately provide the completion function.
This is like Scala's promise, not the JS promise which is more like Scala's Future.
- def pure[A](a: A): AsyncCallback[A]
- def readWriteMutex: CallbackTo[ReadWriteMutex]
Creates a new (non-reentrant) read/write mutex.
- def ref[A](allowStaleReads: Boolean = false, atomicWrites: Boolean = true): CallbackTo[Ref[A]]
- def ref[A]: CallbackTo[Ref[A]]
- Annotations
- @inline()
- def sequence[T[X] <: Iterable[X], A](tca: => T[AsyncCallback[A]])(implicit cbf: BuildFrom[T[AsyncCallback[A]], A, T[A]]): AsyncCallback[T[A]]
Sequence stdlib T over AsyncCallback.
Sequence stdlib T over AsyncCallback. Co-sequence AsyncCallback over stdlib T.
- def sequenceOption[A](oca: => Option[AsyncCallback[A]]): AsyncCallback[Option[A]]
Sequence Option over AsyncCallback.
Sequence Option over AsyncCallback. Co-sequence AsyncCallback over Option.
- def sequenceOption_[A](oca: => Option[AsyncCallback[A]]): AsyncCallback[Unit]
Same as sequenceOption() except avoids combining return values.
- def sequence_[T[X] <: Iterable[X], A](tca: => T[AsyncCallback[A]]): AsyncCallback[Unit]
Same as sequence() except avoids combining return values.
- def suspend[A](f: => AsyncCallback[A]): AsyncCallback[A]
Callback that is recreated each time it is used.
Callback that is recreated each time it is used.
https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_name
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tailrec[A, B](a: A)(f: (A) => AsyncCallback[Either[A, B]]): AsyncCallback[B]
Not literally tail-recursive because AsyncCallback is continuation-based, but this utility in this shape may still be useful.
- def throwException[A](t: => Throwable): AsyncCallback[A]
- def throwExceptionWhenDefined(o: => Option[Throwable]): AsyncCallback[Unit]
- def toString(): String
- Definition Classes
- AnyRef → Any
- def traverse[T[X] <: Iterable[X], A, B](ta: => T[A])(f: (A) => AsyncCallback[B])(implicit cbf: BuildFrom[T[A], B, T[B]]): AsyncCallback[T[B]]
Traverse stdlib T over AsyncCallback.
Traverse stdlib T over AsyncCallback. Distribute AsyncCallback over stdlib T.
- def traverseOption[A, B](oa: => Option[A])(f: (A) => AsyncCallback[B]): AsyncCallback[Option[B]]
Traverse Option over AsyncCallback.
Traverse Option over AsyncCallback. Distribute AsyncCallback over Option.
- def traverseOption_[A, B](oa: => Option[A])(f: (A) => AsyncCallback[B]): AsyncCallback[Unit]
Same as traverseOption() except avoids combining return values.
- def traverse_[T[X] <: Iterable[X], A, B](ta: => T[A])(f: (A) => AsyncCallback[B]): AsyncCallback[Unit]
Same as traverse() except avoids combining return values.
- val unit: AsyncCallback[Unit]
- def viaCallback(onCompletion: (Callback) => Callback): AsyncCallback[Unit]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def byName[A](f: => AsyncCallback[A]): AsyncCallback[A]
Callback that is recreated each time it is used.
Callback that is recreated each time it is used.
https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_name
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) Use AsyncCallback.suspend
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def fromCallback[A](c: CallbackTo[A]): AsyncCallback[A]
- Annotations
- @deprecated
- Deprecated
(Since version ) Use c.asAsyncCallback
- def point[A](a: => A): AsyncCallback[A]
- Annotations
- @deprecated
- Deprecated
(Since version 1.7.0) Use AsyncCallback.delay