From ca5bedb77bf340d13b6a92c63500e3f5a1a0469e Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Thu, 26 Jul 2018 13:36:27 -0700 Subject: [PATCH 1/2] Fix SequenceExecutionHandle accessibility --- Sources/Concurrency/Executor/SequenceExecutor.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Concurrency/Executor/SequenceExecutor.swift b/Sources/Concurrency/Executor/SequenceExecutor.swift index be61f00..e3316fa 100644 --- a/Sources/Concurrency/Executor/SequenceExecutor.swift +++ b/Sources/Concurrency/Executor/SequenceExecutor.swift @@ -26,7 +26,7 @@ public enum SequenceExecutionError: Error { /// and monitoring of the said sequence of tasks. // This cannot be a protocol, since `SequenceExecutor` references this as a // type. Protocols with associatedType cannot be directly used as types. -public class SequenceExecutionHandle { +open class SequenceExecutionHandle { /// Block the caller thread until the sequence of tasks all finished /// execution or the specified timeout period has elapsed. @@ -36,12 +36,12 @@ public class SequenceExecutionHandle { /// completes. /// - throws: `SequenceExecutionError.awaitTimeout` if the given timeout /// period elapsed before the sequence execution completed. - public func await(withTimeout timeout: TimeInterval?) throws -> SequenceResultType { + open func await(withTimeout timeout: TimeInterval?) throws -> SequenceResultType { fatalError("await not yet implemented.") } /// Cancel the sequence execution at the point this function is invoked. - public func cancel() {} + open func cancel() {} } /// The execution of a sequence. From 971f2849466d4565f003d4bea6e396a485d9badf Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Thu, 26 Jul 2018 13:37:13 -0700 Subject: [PATCH 2/2] Add init --- Sources/Concurrency/Executor/SequenceExecutor.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Concurrency/Executor/SequenceExecutor.swift b/Sources/Concurrency/Executor/SequenceExecutor.swift index e3316fa..03c9568 100644 --- a/Sources/Concurrency/Executor/SequenceExecutor.swift +++ b/Sources/Concurrency/Executor/SequenceExecutor.swift @@ -28,6 +28,9 @@ public enum SequenceExecutionError: Error { // type. Protocols with associatedType cannot be directly used as types. open class SequenceExecutionHandle { + /// Initializer. + public init() {} + /// Block the caller thread until the sequence of tasks all finished /// execution or the specified timeout period has elapsed. ///