Is AttributedString sendable?

Here is a warning:

let sendableString: Sendable = AttributedString()
example.swift:13:32: warning: conformance of 'AttributedString' to 'Sendable' is unavailable; this is an error in Swift 6
let sendableString: Sendable = AttributedString()
Foundation.AttributedString:3:11: note: conformance of 'AttributedString' to 'Sendable' has been explicitly marked unavailable here
extension AttributedString : @unchecked Sendable {

Some questions about this:

  1. Is AttributedString Sendable? Is it threadsafe?
  2. Where is this conformance referenced at Foundation.AttributedString:3:11? Xcode cannot find it and pull it up in the editor.
  3. I was hoping to pull up this conformance definition and dig into the history here. For example, maybe there is a comment above the extension, explaining why it was marked unavailable. Maybe there is a related commit in git blame, maybe it is available in some OS version... I searched around in both GitHub - apple/swift: The Swift Programming Language and GitHub - apple/swift-corelibs-foundation: The Foundation Project, providing core utilities, internationalization, and OS independence without figuring out where this extension is coming from.

AttributedString is part of Foundation, so the code that is used on Apple platforms is not open source. You could check out the open source implementation which might or might not work like the one you are interested about: swift-corelibs-foundation/Sources/Foundation/AttributedString at main · apple/swift-corelibs-foundation · GitHub

It looks like it contains yet another implementation of an os_unfair_lock wrapper, like these ones: