From e9285c6bc8e4e22895cf411b798bbe7dd79fa361 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Tue, 8 May 2018 16:36:30 +0100 Subject: [PATCH] Make hopTo(eventLoop:) public. (#395) Motivation: When this method was originally introduced it was also intended as a helper for external users, but we never made it public. Modifications: Make hopTo(eventLoop:) public. Result: Users will have an easier time managing their threads. --- Sources/NIO/EventLoopFuture.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/NIO/EventLoopFuture.swift b/Sources/NIO/EventLoopFuture.swift index 5bb5c3a78..6b90e60c7 100644 --- a/Sources/NIO/EventLoopFuture.swift +++ b/Sources/NIO/EventLoopFuture.swift @@ -935,7 +935,7 @@ extension EventLoopFuture { } } -extension EventLoopFuture { +public extension EventLoopFuture { /// Returns an `EventLoopFuture` that fires when this future completes, but executes its callbacks on the /// target event loop instead of the original one. /// @@ -947,7 +947,7 @@ extension EventLoopFuture { /// - parameters: /// - target: The `EventLoop` that the returned `EventLoopFuture` will run on. /// - returns: An `EventLoopFuture` whose callbacks run on `target` instead of the original loop. - func hopTo(eventLoop target: EventLoop) -> EventLoopFuture { + public func hopTo(eventLoop target: EventLoop) -> EventLoopFuture { if target === self.eventLoop { // We're already on that event loop, nothing to do here. Save an allocation. return self