Files
swift-nio/Tests
George Barnett 7800d84cba Add API to get the result of an isolated ELF, if available (#3721)
Motivation:

A number of NIO APIs are asynchronous and return futures but have
synchronous implementations. If a caller wants to operate on this they
need to register a callback with the future and then operate on the
result. However, now that we have an isolated view on the event loop
future we can provide a fast path: just check whether the result is
already present.

This is particularly helpful for channel initializers which are
typically synchronous. Using the fast path means calls can avoid an
escaping closure from registering a callback on the future.

Modifications:

Add three new APIs to the isolated event loop future:
- `result` which returns the underlying `Result<Value, Error>` or `nil`
if it hasn't been completed yet
- `value` which call `try result.get()`, and
- `isComplete`

Result:

APIs for accessing the result of an ELF from its isolated view if it's
already completed
2026-08-26 09:05:23 +01:00
..
2024-07-19 11:48:17 +02:00