Special case EventLoopPromise.succeed() when Value is Void (#2311)
Co-authored-by: OleksandrZhurba <56148913+OleksandrZhurba@users.noreply.github.com>
This commit is contained in:
parent
3d18e94683
commit
555f1db039
|
@ -2218,3 +2218,11 @@ extension EventLoopPromise: Sendable { }
|
|||
// that by way of the guarantees of the EventLoop protocol, so the compiler cannot
|
||||
// check it.
|
||||
extension EventLoopFuture: @unchecked Sendable { }
|
||||
|
||||
extension EventLoopPromise where Value == Void {
|
||||
// Deliver a successful result to the associated `EventLoopFuture<Void>` object.
|
||||
@inlinable
|
||||
public func succeed() {
|
||||
succeed(Void())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue