Package com.apollographql.apollo3.internal

Types

ConcurrentQueue
Link copied to clipboard
apple
class ConcurrentQueue<T>
GCDWorker
Link copied to clipboard
apple
class GCDWorker(qos: UInt)
InvokeOnCancellation
Link copied to clipboard
apple
typealias InvokeOnCancellation = (CompletionHandler) -> Unit
MainContinuation
Link copied to clipboard
apple
class MainContinuation<R>(continuation: CancellableContinuation<R>)
A continuation that will always dispatch on the main thread
SingleThreadWorker
Link copied to clipboard
apple
class SingleThreadWorker<S : Any>(producer: () -> S, finalizer: (S) -> Unit)

Functions

suspendAndResumeOnMain
Link copied to clipboard
apple
suspend fun <R> suspendAndResumeOnMain(block: (MainContinuation<R>, InvokeOnCancellation) -> Unit): R
Suspends the current coroutine and calls block with a MainContinuation that will always dispatch on the main threadblock will initially be called in the main thread but it's ok to call MainContinuation.resumeWith from any thread, MainContinuation will ensure that the final result is delivered to the main thread.