From 577537a84048be56fd5d430528722dbbe1acf4e1 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 23 Jan 2025 13:54:23 +0000 Subject: [PATCH] Formatting --- Sources/NIOPosix/NIOThreadPool.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Sources/NIOPosix/NIOThreadPool.swift b/Sources/NIOPosix/NIOThreadPool.swift index a509573a10..c3196b6772 100644 --- a/Sources/NIOPosix/NIOThreadPool.swift +++ b/Sources/NIOPosix/NIOThreadPool.swift @@ -420,11 +420,17 @@ extension NIOThreadPool { /// - body: The closure which performs some blocking work to be done on the thread pool. /// - Returns: The `EventLoopFuture` of `promise` fulfilled with the result (or error) of the passed closure. @preconcurrency - public func runIfActive(eventLoop: EventLoop, _ body: @escaping @Sendable () throws -> T) -> EventLoopFuture { + public func runIfActive( + eventLoop: EventLoop, + _ body: @escaping @Sendable () throws -> T + ) -> EventLoopFuture { self._runIfActive(eventLoop: eventLoop, body) } - private func _runIfActive(eventLoop: EventLoop, _ body: @escaping @Sendable () throws -> T) -> EventLoopFuture { + private func _runIfActive( + eventLoop: EventLoop, + _ body: @escaping @Sendable () throws -> T + ) -> EventLoopFuture { let promise = eventLoop.makePromise(of: T.self) self.submit { shouldRun in guard case shouldRun = NIOThreadPool.WorkItemState.active else {