https://github.com/muukii/concurrencycontinuationreproduce
[FB11707587] **`withCheckedContinuation`'s body will run on background thread in case of starting from main-actor.**.
https://github.com/muukii/concurrencycontinuationreproduce
Last synced: about 2 months ago
JSON representation
[FB11707587] **`withCheckedContinuation`'s body will run on background thread in case of starting from main-actor.**.
- Host: GitHub
- URL: https://github.com/muukii/concurrencycontinuationreproduce
- Owner: muukii
- Created: 2022-10-20T14:31:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-08T02:59:57.000Z (over 2 years ago)
- Last Synced: 2025-03-16T17:22:26.564Z (about 2 months ago)
- Language: Swift
- Homepage: https://forums.swift.org/t/xcode-14-1-withcheckedcontinuations-body-will-run-on-background-thread-in-case-of-starting-from-main-actor/60953
- Size: 34.2 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ConcurrencyContinuationReproduce
Differences of Concurrency behaviors between Xcode 14.0 and 14.1
- Xcode 14.0
- iOS 13+: Runs on main (inherited same context)- Xcode 14.1 RC.1
- iOS 15+: Runs on main (inherited same context)
- iOS 14: Runs on background (hops to different context)
- iOS 13: Crashes- Xcode 14.1 RC.2
- iOS 15+: Runs on main (inherited same context)
- iOS 14: Runs on background (hops to different context)
- iOS 13: Runs on background- Xcode 14.1 Release
- iOS 15+: Runs on main (inherited same context)
- iOS 14: Runs on background (hops to different context)
- iOS 13: Runs on background- Xcode 14.2 (✅ Fixed)
- iOS 13+: Runs on main (inherited same context)On Xcode 14.1
**`withCheckedContinuation`'s body will run on background thread in case of starting from main-actor.**
This situation happens only earlier than iOS 15. so 13.x and 14.x have this situation with Xcode 14.1.
Those OS versions are targets of back-deployments of Concurrency.```swift
Task { @MainActor () -> Void in
await withCheckedContinuation { c in
// >= iOS 15 : on main-thread
// < iOS 15 : on background-thread
c.resume()
}
}
```
Until Xcode 14.0(also 14.0.1) is fine.
## Related
https://twitter.com/kylehickinson/status/1582471814843883535