0

I am interested to learn more about the implementation details of class DispatchQueue : DispatchObject.
I have looked here, and here but I can't find the matching implementation.

ScottyBlades
  • 12,189
  • 5
  • 77
  • 85
  • Is on the Apple doc only the declaration? – sheldor May 18 '21 at 21:07
  • Yea, thats all I see and it specifies that it is in the Dispatch Framework. – ScottyBlades May 18 '21 at 22:10
  • 1
    `DispatchQueue` is the imported name for `OS_dispatch_queue` (see https://github.com/apple/swift-corelibs-libdispatch/blob/34f383d34450d47dd5bdfdf675fcdaa0d0ec8031/src/swift/Dispatch.apinotes#L59-L60), which appears to be... a protocol? https://github.com/apple/swift-corelibs-libdispatch/blob/34f383d34450d47dd5bdfdf675fcdaa0d0ec8031/src/internal.h#L131 – Alexander May 18 '21 at 23:15
  • Good find! Thats so weird, I wonder why the [doc](https://developer.apple.com/documentation/dispatch/dispatchqueue) says that it is an object. – ScottyBlades May 18 '21 at 23:21

1 Answers1

1

You probably won't find this in the Swift code because it isn't Swift. This is just a front end for Cocoa's OS_dispatch_queue etc., which are not open source. It's not part of the Swift library; it's an iOS thing, not a language thing.

matt
  • 515,959
  • 87
  • 875
  • 1,141