DispatchSerialQueue not conforming to UnownedSerialExecutor in iOS 17.0

I'm playing around with custom actor executors a bit ... as seen in What's new in Swift at WWDC 2023...

The following code errors out:

@available(iOS 17.0, *)
actor TestActor {
	private let queue: DispatchSerialQueue
	nonisolated var unownedExecutor: UnownedSerialExecutor { queue.asUnownedSerialExecutor() }
...

Value of type 'DispatchSerialQueue' has no member 'asUnownedSerialExecutor'

There is the _DispatchSerialExecutorQueue that actually does provide the asUnownedSerialExecutor() function ... This conflicts a bit with what Doug said during the talk...

"The synchronization of actors via dispatch queues is made possible because dispatch queue conforms to the new SerialExecutor protocol."

https://developer.apple.com/wwdc23/10164?time=2206

Looks like DispatchSerialQueue does not inherit from _DispatchSerialExecutorQueue as per documentation: https://developer.apple.com/documentation/dispatch/dispatchserialqueuehttps://developer.apple.com/documentation/dispatch/dispatchserialqueue

DispatchSerialQueue not conforming to UnownedSerialExecutor in iOS 17.0
 
 
Q