Skip to content

Commit 7f641f3

Browse files
committed
Revert "[Workaround][Concurrency] Mark Job as NOT moveonly until we fix moveonly types (#64536)"
This reverts commit abe377c.
1 parent 21109a3 commit 7f641f3

File tree

6 files changed

+9
-32
lines changed

6 files changed

+9
-32
lines changed

stdlib/public/Concurrency/PartialAsyncTask.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ extension UnownedJob: CustomStringConvertible {
105105
}
106106

107107
#if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
108-
/// A unit of scheduleable work.
108+
//// A unit of scheduleable work.
109109
///
110110
/// Unless you're implementing a scheduler,
111111
/// you don't generally interact with jobs directly.
112112
@available(SwiftStdlib 5.9, *)
113113
@frozen
114-
// @_moveOnly // FIXME(moveonly): rdar://107050387 Move-only types fail to be found sometimes, must fix or remove Job before shipping
114+
@_moveOnly
115115
public struct Job: Sendable {
116116
internal var context: Builtin.Job
117117

test/Concurrency/Runtime/custom_executors_moveOnly_job.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// REQUIRES: concurrency
44
// REQUIRES: executable_test
55

6-
// FIXME(moveonly): rdar://106849189 move-only types should be supported in freestanding mode
6+
// rdar://106849189 move-only types should be supported in freestanding mode
77
// UNSUPPORTED: freestanding
88

99
// FIXME: rdar://107112715 test failing on iOS simulator, investigating
@@ -13,11 +13,7 @@
1313
// REQUIRES: concurrency_runtime
1414

1515
final class InlineExecutor: SerialExecutor, CustomStringConvertible {
16-
// FIXME(moveonly): rdar://107050387 Move-only types fail to be found sometimes, must fix or remove Job before shipping
17-
// public func enqueue(_ job: __owned Job) {
18-
// job.runSynchronously(on: self.asUnownedSerialExecutor())
19-
// }
20-
public func enqueue(_ job: UnownedJob) {
16+
public func enqueue(_ job: __owned Job) {
2117
job.runSynchronously(on: self.asUnownedSerialExecutor())
2218
}
2319

test/Concurrency/Runtime/custom_executors_priority.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
// REQUIRES: concurrency_runtime
1414

1515
final class InlineExecutor: SerialExecutor {
16-
// FIXME(moveonly): rdar://107050387 Move-only types fail to be found sometimes, must fix or remove Job before shipping
17-
// public func enqueue(_ job: __owned Job) {
18-
// print("\(self): enqueue (priority: \(TaskPriority(job.priority)!))")
19-
// job.runSynchronously(on: self.asUnownedSerialExecutor())
20-
// }
21-
public func enqueue(_ job: UnownedJob) {
16+
public func enqueue(_ job: __owned Job) {
2217
print("\(self): enqueue (priority: \(TaskPriority(job.priority)!))")
2318
job.runSynchronously(on: self.asUnownedSerialExecutor())
2419
}

test/Concurrency/Runtime/custom_executors_protocol.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,9 @@ final class NaiveQueueExecutor: SpecifiedExecutor, CustomStringConvertible {
3838
self.queue = queue
3939
}
4040

41-
// FIXME(moveonly): rdar://107050387 Move-only types fail to be found sometimes, must fix or remove Job before shipping
42-
// public func enqueue(_ job: __owned Job) {
43-
// print("\(self): enqueue")
44-
// let unowned = UnownedJob(job)
45-
// queue.sync {
46-
// unowned.runSynchronously(on: self.asUnownedSerialExecutor())
47-
// }
48-
// print("\(self): after run")
49-
// }
50-
public func enqueue(_ unowned: UnownedJob) {
41+
public func enqueue(_ job: __owned Job) {
5142
print("\(self): enqueue")
43+
let unowned = UnownedJob(job)
5244
queue.sync {
5345
unowned.runSynchronously(on: self.asUnownedSerialExecutor())
5446
}

test/Concurrency/custom_executor_enqueue_impls.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
// RUN: %target-typecheck-verify-swift -enable-experimental-move-only -disable-availability-checking
22
// REQUIRES: concurrency
33

4-
// FIXME(moveonly): rdar://106849189 move-only types should be supported in freestanding mode
4+
// rdar://106849189 move-only types should be supported in freestanding mode
55
// UNSUPPORTED: freestanding
66

7-
// FIXME(moveonly): rdar://107050387 Move-only types fail to be found sometimes, must fix or remove Job before shipping
8-
// REQUIRES: radr107050387
9-
107
// FIXME: rdar://107112715 test failing on iOS simulator, investigating
118
// UNSUPPORTED: OS=ios
129

test/IRGen/async/builtin_executor.sil

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
// RUN: %target-swift-frontend -primary-file %s -module-name=test -disable-llvm-optzns -disable-swift-specific-llvm-optzns -emit-ir -sil-verify-all | %IRGenFileCheck %s
22

33
// REQUIRES: concurrency
4-
// FIXME(moveonly): rdar://106849189 move-only types should be supported in freestanding mode
4+
// rdar://106849189 move-only types should be supported in freestanding mode
55
// UNSUPPORTED: freestanding
66

7-
// FIXME(moveonly): rdar://107050387 Move-only types fail to be found sometimes, must fix or remove Job before shipping
8-
// REQUIRES: radr107050387
9-
107
sil_stage canonical
118

129
import Builtin

0 commit comments

Comments
 (0)