Skip to content

Releases: vapor/async-kit

Finish fixing sequence append for ELFQueue

24 Feb 22:21
41a316e
Compare
Choose a tag to compare

Previous PR (#54) did not fully fix the problem with appending sequences to EventLoopFutureQueue. This PR covers the missing bits.

Fix sequence-append in EventLoopFutureQueue

24 Feb 20:50
304bd76
Compare
Choose a tag to compare

The default behavior of appending to ELFQ is to run the next item on completion of the previous, but the APIs for appending sequences incorrectly assumed the next item is only run on successful completion of the previous.

Don't assert when a future in a queued sequence fails

11 Feb 21:13
e671248
Compare
Choose a tag to compare

Currently, if one of the futures appended by EventLoopFutureQueue.append(each:generator:) fails, we fire an incorrect assertion instead of failing the chain correctly. This PR fixes the issue and adds unit tests.

AsyncKit 1.0.0-beta.2.2

31 Jan 14:20
8e9d41f
Compare
Choose a tag to compare
Pre-release

Features:

  • Adds a futureTry method to EventLoop that takes in a throwing closure and produces a future with the closure's result.
  • Adds a .append(each:_:) method to the EventLoopFutureQueue type, which maps each element of the sequence passed in into a future result and then queues the future.

Fixes:

  • EventLoopFutureQueue is thread safe now.

AsyncKit 1.0.0-beta.2.1

27 Jan 14:09
e81bf8e
Compare
Choose a tag to compare
Pre-release
  • Adds an EventLoopFutureQueue type (#48).

This type can be used to queue closures that emit EventLoopFutures. This allows you to ensure that a given future will not be run until the previous ones complete, succeed, or fail, depending on the condition you set.

AsyncKit 1.0.0 Beta 2

09 Dec 13:57
cb8e6ee
Compare
Choose a tag to compare
AsyncKit 1.0.0 Beta 2 Pre-release
Pre-release
  • Separated ConnectionPool into two components: EventLoopGroupConnectionPool and EventLoopConnectionPool (#42)

This change greatly reduces code complexity by breaking out the old ConnectionPool's behavior into distinct components. It also increases usability, allowing developers to choose which functionality they want to use.

EventLoopGroupConnectionPool: Maintains one EventLoopConnectionPool per EventLoop on the supplied EventLoopGroup. Use this if you are in a global, thread-safe context. This is great for application's that use wait(), classes that do EL-synchronization internally, or shared pools that want each event loop to have its own collection of pools. This class is thread-safe.

EventLoopConnectionPool: A pool of connections that is tied to a single event loop.
If you have an EventLoopGroupConnectionPool, you can get an individual EventLoop's pool by doing groupPool.pool(for: eventLoop). This class is not thread-safe and must always be used from the associated EventLoop.

  • Custom Loggers are now passable anywhere logging occurs.

  • Enabled test discovery on Linux (#46)

AsyncKit 1.0.0 Beta 1

24 Oct 18:49
d9fd2be
Compare
Choose a tag to compare
AsyncKit 1.0.0 Beta 1 Pre-release
Pre-release
  • ConnectionPool can now be shared across an EventLoopGroup. (#40)

Notes: ConnectionPool is now based on an EventLoopGroup and has a ConnectionPoolEventLoopPreference enum for informing the pool which EventLoop you would like to be called back on. ConnectionPool can still be used on a single EventLoop, this change just expands its applicability to more use cases.

  • ConnectionPool can now prune old, closed connections when resource demand is low. (#41)

AsyncKit 1.0.0 Alpha 1

06 Jun 16:30
b5742bf
Compare
Choose a tag to compare

v0.1.0

10 Nov 17:42
967c9a4
Compare
Choose a tag to compare

EventLoopFuture Operators

Adds standard operators to future types, so if you have for example, two EventLoopFuture<Int>, you can add them together:

let future1 = eventLoop.future(1)
let future2 = eventLoop.future(2)
let future3 = future1 + future2

Here's a list of all the operators:

+
+=
-
-=
*
*=
%
%=
&
&=
/
/=
>
>=
<
<=
<<
<<=
>>
>>=
^
^=
|
|=
~