Swiftpack.co -  Package - vapor/async-kit
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Sugary extensions for the SwiftNIO library
.package(url: "https://github.com/vapor/async-kit.git", from: "1.3.0")


Documentation Team Chat MIT License CI Swift 5.2


Stars: 40
Last commit: 1 week ago

Release Notes

Add "sequenced" variants of flatMapEach() and flatMapEachCompact()
18 weeks ago
This patch was authored and released by @gwynne.

These new variants guarantee two specific behaviors:

  1. The futures returned for each element of the iterated sequence will be executed singularly and strictly in order. Only one will run at a time, and the order in which they run will match that returned by the transformation callback.

  2. If any one of the futures should fail, no other futures will begin execution, even if they were ready to do so.

Additional changes:

  • Added new tests for the "sequenced" behaviors,
  • Made sure the ELG used for the collections+futures tests has multiple threads, otherwise the tests are meaningless.
  • Fixed a couple of typos in comments.
  • Simplified the implementations of the original flatMapEach(on:_:) and flatMapEachCompact(on:_:) (no functional changes).

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco