Skip to content

Commit 0845568

Browse files
neakorrudro
authored andcommitted
Rename SerialSequenceExecutor (#23)
Renames `SerialSequenceExecutor` to `ImmediateSerialSequenceExecutor` to better represent the execution is done immediately on the caller thread, since a `ConcurrentSequenceExecutor` limited to a maximum concurrency level of 1 would also be serial.
1 parent 9d7fd4b commit 0845568

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Concurrency.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
41B94843210A4744007E59C8 /* SerialSequenceExecutor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B9483F210A4744007E59C8 /* SerialSequenceExecutor.swift */; };
10+
41B94843210A4744007E59C8 /* ImmediateSerialSequenceExecutor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B9483F210A4744007E59C8 /* ImmediateSerialSequenceExecutor.swift */; };
1111
41B94844210A4744007E59C8 /* SequenceExecutor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B94840210A4744007E59C8 /* SequenceExecutor.swift */; };
1212
41B94845210A4744007E59C8 /* ConcurrentSequenceExecutor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B94841210A4744007E59C8 /* ConcurrentSequenceExecutor.swift */; };
1313
41B94846210A4744007E59C8 /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B94842210A4744007E59C8 /* Task.swift */; };
@@ -34,7 +34,7 @@
3434
/* End PBXContainerItemProxy section */
3535

3636
/* Begin PBXFileReference section */
37-
41B9483F210A4744007E59C8 /* SerialSequenceExecutor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SerialSequenceExecutor.swift; sourceTree = "<group>"; };
37+
41B9483F210A4744007E59C8 /* ImmediateSerialSequenceExecutor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImmediateSerialSequenceExecutor.swift; sourceTree = "<group>"; };
3838
41B94840210A4744007E59C8 /* SequenceExecutor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SequenceExecutor.swift; sourceTree = "<group>"; };
3939
41B94841210A4744007E59C8 /* ConcurrentSequenceExecutor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConcurrentSequenceExecutor.swift; sourceTree = "<group>"; };
4040
41B94842210A4744007E59C8 /* Task.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Task.swift; sourceTree = "<group>"; };
@@ -74,7 +74,7 @@
7474
41B9483E210A4744007E59C8 /* Executor */ = {
7575
isa = PBXGroup;
7676
children = (
77-
41B9483F210A4744007E59C8 /* SerialSequenceExecutor.swift */,
77+
41B9483F210A4744007E59C8 /* ImmediateSerialSequenceExecutor.swift */,
7878
41B94840210A4744007E59C8 /* SequenceExecutor.swift */,
7979
41B94841210A4744007E59C8 /* ConcurrentSequenceExecutor.swift */,
8080
41B94842210A4744007E59C8 /* Task.swift */,
@@ -224,7 +224,7 @@
224224
41B94845210A4744007E59C8 /* ConcurrentSequenceExecutor.swift in Sources */,
225225
OBJ_28 /* AtomicInt.swift in Sources */,
226226
OBJ_29 /* AtomicReference.swift in Sources */,
227-
41B94843210A4744007E59C8 /* SerialSequenceExecutor.swift in Sources */,
227+
41B94843210A4744007E59C8 /* ImmediateSerialSequenceExecutor.swift in Sources */,
228228
OBJ_30 /* CountDownLatch.swift in Sources */,
229229
);
230230
runOnlyForDeploymentPostprocessing = 0;

Sources/Concurrency/Executor/SerialSequenceExecutor.swift renamed to Sources/Concurrency/Executor/ImmediateSerialSequenceExecutor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
import Foundation
1818

1919
/// An executor that executes sequences of tasks serially from the
20-
/// caller thread.
20+
/// caller thread as soon as the execute method is invoked.
2121
///
2222
/// - note: Generally this implementation should only be used for debugging
2323
/// purposes, as debugging highly concurrent task executions can be very
2424
/// challenging. Production code should use `ConcurrentSequenceExecutor`.
2525
/// - seeAlso: `SequenceExecutor`.
2626
/// - seeAlso: `Task`.
27-
public class SerialSequenceExecutor: SequenceExecutor {
27+
public class ImmediateSerialSequenceExecutor: SequenceExecutor {
2828

2929
/// Initializer.
3030
public init() {}
3131

3232
/// Execute a sequence of tasks serially from the given initial task
33-
/// on the caller thread.
33+
/// on the caller thread, immediately.
3434
///
3535
/// - parameter initialTask: The root task of the sequence of tasks
3636
/// to be executed.

0 commit comments

Comments
 (0)