DispatchQueue

class DispatchQueue : DispatchObject
  • Undocumented

    Declaration

    Swift

    static var currentLabel: String { get }
  • Provides an asynchronous computation that runs on this queue.

    Declaration

    Swift

    func shift<F>() -> Kind<F, Void> where F : Async

    Return Value

    An asynchronous computation that runs on this queue.

  • Unsafely runs a computation in a synchronous manner.

    Throws

    Error happened during the execution of the computation, of the error type of the underlying MonadError.

    Declaration

    Swift

    func runBlocking<F: UnsafeRun, A>(
        _ fa: @escaping () -> Kind<F, A>) throws -> A

    Parameters

    fa

    Computation to be run.

    Return Value

    Result of running the computation.

  • Unsafely runs a computation in an asynchronous manner.

    Declaration

    Swift

    func runNonBlocking<F: UnsafeRun, A>(
        _ fa: @escaping () -> Kind<F, A>,
        _ callback: @escaping Callback<F.E, A> = { _ in })

    Parameters

    fa

    Computation to be run.

    callback

    Callback to report the result of the evaluation.