Skip to content

Class

EventLoopFutureQueue

Allows you to queue closures that produce an EventLoopFuture, so each future only gets run if the previous ones complete, succeed, or fail.
final class EventLoopFutureQueue

Topics

Initializers

Instance Properties

  • eventLoop
    The event loop that all the futures’s completions are handled on.

Instance Methods

  • append(_:runningOn:)
    An overload for append(generator:runningOn:) that takes in an EventLoopFuture as an auto closure to provide a better 1-liner API.
  • append(each:_:)
    For each element of the provided collection, invoke the given generator and queue the returned future. Return a future whose value is an array containing the result of each generated future in the same order as the original sequence. The resulting array is intended to have semantics substantially similar to those provided by EventLoop.flatten(_:on:).
  • append(onPrevious:generator:)
    Adds another EventLoopFuture producing closure to be run as soon as all previously queued future have completed, succeeded, or failed.

Enumerations

See Also

EventLoopFuture

  • mapEach(_:)
    Gets the value of a key path for each element in the sequence that is wrapped by an EventLoopFuture.
  • mapEach(_:)
    Calls a closure on each element in the sequence that is wrapped by an EventLoopFuture.
  • mapEachCompact(_:)
    Gets the optional value of a key path for each element in the sequence that is wrapped by an EventLoopFuture.
  • mapEachCompact(_:)
    Calls a closure, which returns an Optional, on each element in the sequence that is wrapped by an EventLoopFuture.
  • mapEachFlat(_:)
    Gets the collection value of a key path for each element in the sequence that is wrapped by an EventLoopFuture, combining the results into a single result collection.
  • mapEachFlat(_:)
    Calls a closure which returns a collection on each element in the sequence that is wrapped by an EventLoopFuture, combining the results into a single result collection.
  • flatMapEach(on:_:)
    Calls a closure, which returns an EventLoopFuture, on each element in a sequence that is wrapped by an EventLoopFuture. No results from each future are expected.
  • flatMapEach(on:_:)
    Calls a closure, which returns an EventLoopFuture, on each element in a sequence that is wrapped by an EventLoopFuture.
  • flatMapEachCompact(on:_:)
    Calls a closure, which returns an EventLoopFuture<Optional>, on each element in a sequence that is wrapped by an EventLoopFuture.
  • flatMapEachThrowing(_:)
    Calls a closure on each element in the sequence that is wrapped by an EventLoopFuture.
  • flatMapEachCompactThrowing(_:)
    Calls a closure, which returns an Optional, on each element in the sequence that is wrapped by an EventLoopFuture.
  • sequencedFlatMapEach(_:)
    An overload of sequencedFlatMapEach(_:) which returns a Void future instead of [Void] when the result type of the transform closure is Void.
  • sequencedFlatMapEach(_:)
    A variant form of flatMapEach(on:_:) which guarantees:
  • sequencedFlatMapEachCompact(_:)
    Variant of sequencedFlatMapEach(_:) which provides compactMap() semantics by allowing result values to be nil. Such results are not included in the output array.
  • whenTheySucceed(_:_:file:line:)
    Returns a new EventLoopFuture that succeeds only if all of the provided fs succeed. The new EventLoopFuture will contain all of the values fulfilled by the fs.