Skip to content
This repository was archived by the owner on Aug 29, 2022. It is now read-only.

Commit 572ebbb

Browse files
committed
Remove unneeded queue-related protocol requirements
1 parent af64088 commit 572ebbb

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

Sources/Deferred/Executor.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,13 @@ public protocol Executor: class {
4949

5050
/// Execute the `workItem`.
5151
func submit(_ workItem: DispatchWorkItem)
52-
53-
/// If the executor is a higher-level wrapper around a dispatch queue,
54-
/// may be used instead of `submit(_:)` for more efficient execution.
55-
var underlyingQueue: DispatchQueue? { get }
5652
}
5753

5854
extension Executor {
5955
/// By default, submits the closure contents of the work item.
6056
public func submit(_ workItem: DispatchWorkItem) {
6157
submit(workItem.perform)
6258
}
63-
64-
/// By default, `nil`; the executor's `submit(_:)` is used unconditionally.
65-
public var underlyingQueue: DispatchQueue? {
66-
return nil
67-
}
6859
}
6960

7061
/// Dispatch queues invoke function bodies submitted to them serially in FIFO
@@ -95,10 +86,6 @@ extension DispatchQueue: Executor {
9586
public func submit(_ workItem: DispatchWorkItem) {
9687
async(execute: workItem)
9788
}
98-
99-
public var underlyingQueue: DispatchQueue? {
100-
return self
101-
}
10289
}
10390

10491
/// An operation queue manages a number of operation objects, making high

Sources/Deferred/Future.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ public protocol FutureProtocol: CustomDebugStringConvertible, CustomReflectable
3030
/// A type that represents the result of some asynchronous operation.
3131
associatedtype Value
3232

33-
/// Calls some `body` closure once the value is determined.
34-
func upon(_ executor: PreferredExecutor, execute body: @escaping(Value) -> Void)
35-
3633
/// Call some `body` closure once the value is determined.
3734
///
3835
/// If the value is determined, the closure should be submitted to the

0 commit comments

Comments
 (0)