Skip to content

Commit dbcbdf8

Browse files
authored
Initiate review of SE-0417: Task Executor Preference (#2239)
1 parent e5bf0ff commit dbcbdf8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

proposals/NNNN-task-executor-preference.md renamed to proposals/0417-task-executor-preference.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Task Executor Preference
22

3-
* Proposal: SE-NNNN
3+
* Proposal: [SE-0417](0417-task-executor-preference.md)
44
* Author: [Konrad 'ktoso' Malawski](https://github.com/ktoso), [John McCall](https://github.com/rjmccall), [Franz Busch](https://github.com/FranzBusch)
5-
* Review Manager: TBD
6-
* Status: Partially implemented [PR #68793](https://github.com/apple/swift/pull/68793)
7-
* Implementation: TBD
5+
* Review Manager: [Doug Gregor](https://github.com/DougGregor)
6+
* Status: **Active Review (December 12...26, 2023)**
7+
* Implementation: [PR #68793](https://github.com/apple/swift/pull/68793)
88
* Review: TBD
99
* Discussion threads:
1010
* Pitch: [Pitch: Task Executor Preference](https://forums.swift.org/t/pitch-task-executor-preference/68191)
11-
11+
1212
## Introduction
1313

1414
Swift Concurrency uses tasks and actors to model concurrency and primarily relies on actor isolation to determine where a specific piece of code shall execute.
@@ -178,17 +178,17 @@ await withTaskExecutor(someExecutor) {
178178
Once set, the effect of an executor preference is such that a nonisolated func instead of immediately hopping to the global pool, it may hop to the preferred executor, e.g.:
179179

180180
```swift
181-
nonisolated func tryMe() async {
181+
nonisolated func doSomething() async {
182182
// ...
183183
}
184184

185185
let preferredExecutor: SomeConcreteTaskExecutor = ...
186186
Task(on: preferredExecutor) {
187187
// executes on 'preferredExecutor'
188-
await tryMe() // tryMe body would execute on 'preferredExecutor'
188+
await doSomething() // doSomething body would execute on 'preferredExecutor'
189189
}
190190

191-
await tryMe() // tryMe body would execute on 'default global concurrent executor'
191+
await doSomething() // doSomething body would execute on 'default global concurrent executor'
192192
```
193193

194194
### The `TaskExecutor` protocol

0 commit comments

Comments
 (0)