# Clarification needed on UnsafeContinuation documentation

**URL:** <https://forums.swift.org/t/clarification-needed-on-unsafecontinuation-documentation/57803>\
**Category:** Using Swift\
**Created:** [June 3, 2022, 2:50pm UTC](https://forums.swift.org/t/clarification-needed-on-unsafecontinuation-documentation/57803 "2022-06-03T14:50:53Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![ole](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ole/32/18720_2.png) [@ole](https://forums.swift.org/u/ole)\
**Post date:** [October 10, 2022, 2:04pm UTC](https://forums.swift.org/t/clarification-needed-on-unsafecontinuation-documentation/57803/20 "2022-10-10T14:04:06Z")

</div>

> [@John\_McCall](#):
>
> Now, there is a bug in Xcode 14 when compiling for macOS because it ships with an old macOS SDK. That bug doesn't actually break any of the ordering properties above. It does, however, break Swift's data isolation guarantees because it causes `withUnsafeContinuation`, when called from an actor-isolated context, to send a non-`Sendable` function to a non-isolated executor and then call it, which is completely against the rules.

@John_McCall If you don’t mind my asking, was this bug known inside Apple before the final release of Xcode 14.0? Or were Apple folks surprised because nobody thought through the implications of matching the Swift 5.7 compiler with the Swift 5.6's standard library module interface? Or was it known but not considered as a serious issue? I don't mean to blame anyone – as evidenced by this thread, [I was aware of the special behavior of `withUnsafeContinuation`](https://forums.swift.org/t/clarification-needed-on-unsafecontinuation-documentation/57803/8) and didn't think it through, either.

I'm asking because the compiler generating code that breaks concurrency invariants is a serious problem, and I'm surprised by the lack of communication from Apple about it:

- I can't find any mention of it in the [Xcode 14.0 release notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes) or [Xcode 14.0.1 release notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-14_0_1-release-notes). In my opinion, something like this warrants a big red warning at the top of the release notes: "Don't use Xcode 14.0 to build macOS targets that use concurrency!"

- The bug is hard/impossible for third-party developers to catch during the SDK beta phase because Xcode betas ship with the beta macOS SDK, only to revert back to last year's SDK for the final release. This is another argument for Apple to communicate it offensively.

- The thread that first (AFAIK) mentioned this problem on this forum, [Concurrency is broken in Xcode 14 for macOS (2022-09-14)](https://forums.swift.org/t/concurrency-is-broken-in-xcode-14-for-macos/60294), received little engagement or acknowledgement of the issue. (I know that no-one can read everything, so again no blame!)

---

_[View the full topic](https://forums.swift.org/t/clarification-needed-on-unsafecontinuation-documentation/57803)._
