Skip to content

Commit 9d587c6

Browse files
authored
Merge pull request #20 from uber/execution-fix_typo-master
Fix typo in task ID tracking parameter
2 parents 5854d8e + 5e595a8 commit 9d587c6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Sources/Concurrency/Executor/ConcurrentSequenceExecutor.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ public class ConcurrentSequenceExecutor: SequenceExecutor {
2727
/// - parameter name: The name of the executor.
2828
/// - parameter qos: The quality of service of this executor. This
2929
/// defaults to `userInitiated`.
30-
/// - parameter shouldTackTaskId: `true` if task IDs should be tracked
30+
/// - parameter shouldTrackTaskId: `true` if task IDs should be tracked
3131
/// as tasks are executed. `false` otherwise. By tracking the task IDs,
3232
/// if waiting on the completion of a task sequence times out, the
3333
/// reported error contains the ID of the task that was being executed
3434
/// when the timeout occurred. The tracking does incur a minor
3535
/// performance cost. This value defaults to `false`.
36-
public init(name: String, qos: DispatchQoS = .userInitiated, shouldTackTaskId: Bool = false) {
36+
public init(name: String, qos: DispatchQoS = .userInitiated, shouldTrackTaskId: Bool = false) {
3737
taskQueue = DispatchQueue(label: "Executor.taskQueue-\(name)", qos: qos, attributes: .concurrent)
38-
self.shouldTackTaskId = shouldTackTaskId
38+
self.shouldTrackTaskId = shouldTrackTaskId
3939
}
4040

4141
/// Execute a sequence of tasks concurrently from the given initial task.
@@ -58,15 +58,15 @@ public class ConcurrentSequenceExecutor: SequenceExecutor {
5858
// MARK: - Private
5959

6060
private let taskQueue: DispatchQueue
61-
private let shouldTackTaskId: Bool
61+
private let shouldTrackTaskId: Bool
6262

6363
private func execute<SequenceResultType>(_ task: Task, with sequenceHandle: SynchronizedSequenceExecutionHandle<SequenceResultType>, _ execution: @escaping (Task, Any) -> SequenceExecution<SequenceResultType>) {
6464
taskQueue.async {
6565
guard !sequenceHandle.isCancelled else {
6666
return
6767
}
6868

69-
if self.shouldTackTaskId {
69+
if self.shouldTrackTaskId {
7070
sequenceHandle.willBeginExecuting(taskId: task.id)
7171
}
7272

Tests/ConcurrencyTests/Executor/ConcurrentSequenceExecutorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class ConcurrentSequenceExecutorTests: XCTestCase {
122122
}
123123

124124
func test_executeSequence_withNonTerminatingSequence_withTimeout_verifyAwaitTimeout() {
125-
let executor = ConcurrentSequenceExecutor(name: "test_executeSequence_withNonTerminatingSequence_withTimeout_verifyAwaitTimeout", shouldTackTaskId: true)
125+
let executor = ConcurrentSequenceExecutor(name: "test_executeSequence_withNonTerminatingSequence_withTimeout_verifyAwaitTimeout", shouldTrackTaskId: true)
126126

127127
let sequencedTask = MockSelfRepeatingTask(id: 123) {
128128
return 0

0 commit comments

Comments
 (0)