Skip to content

Commit 8c8e0b0

Browse files
ktosoeeckstein
authored andcommitted
[Executors] Avoid using Job typealias and use the ExecutorJob explicitly
1 parent 148f91c commit 8c8e0b0

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

stdlib/public/Distributed/DistributedDefaultExecutor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal final class DistributedRemoteActorReferenceExecutor: SerialExecutor {
2424
internal init() {}
2525

2626
@inlinable
27-
public func enqueue(_ job: __owned Job) {
27+
public func enqueue(_ job: __owned ExecutorJob) {
2828
let jobDescription = job.description
2929
fatalError("Attempted to enqueue \(Job.self) (\(jobDescription)) on executor of remote distributed actor reference!")
3030
}

test/Concurrency/Runtime/custom_executors_complex_equality_crash.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class NaiveQueueExecutor: SerialExecutor, CustomStringConvertible {
2323
self.queue = queue
2424
}
2525

26-
public func enqueue(_ job: __owned Job) {
26+
public func enqueue(_ job: __owned ExecutorJob) {
2727
let unowned = UnownedJob(job)
2828
queue.sync {
2929
unowned.runSynchronously(on: self.asUnownedSerialExecutor())

test/Concurrency/Runtime/custom_executors_moveOnly_job.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// REQUIRES: concurrency_runtime
1111

1212
final class InlineExecutor: SerialExecutor, CustomStringConvertible {
13-
public func enqueue(_ job: __owned Job) {
13+
public func enqueue(_ job: __owned ExecutorJob) {
1414
job.runSynchronously(on: self.asUnownedSerialExecutor())
1515
}
1616

test/Concurrency/Runtime/custom_executors_priority.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// REQUIRES: concurrency_runtime
1111

1212
final class InlineExecutor: SerialExecutor {
13-
public func enqueue(_ job: __owned Job) {
13+
public func enqueue(_ job: __owned ExecutorJob) {
1414
print("\(self): enqueue (priority: \(TaskPriority(job.priority)!))")
1515
job.runSynchronously(on: self.asUnownedSerialExecutor())
1616
}

test/Concurrency/Runtime/custom_executors_protocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ final class NaiveQueueExecutor: SpecifiedExecutor, CustomStringConvertible {
3535
self.queue = queue
3636
}
3737

38-
public func enqueue(_ job: __owned Job) {
38+
public func enqueue(_ job: __owned ExecutorJob) {
3939
print("\(self): enqueue")
4040
let unowned = UnownedJob(job)
4141
queue.sync {

0 commit comments

Comments
 (0)