• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Carbon -> Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Carbon -> Cocoa


  • Subject: Re: Carbon -> Cocoa
  • From: Alastair Houghton <email@hidden>
  • Date: Thu, 23 Aug 2018 11:28:29 +0100

On 22 Aug 2018, at 21:42, Saagar Jha <email@hidden> wrote:
>
>> Are they? kqueue() supports monitoring of fds, Mach ports and timers, so
>> there’s really no reason that CFRunLoop would have to spawn a background
>> thread just to monitor some file descriptors. As far as I can tell, the
>> current CFRunLoop implementation is built on top of GCD, which sadly we
>> don’t have the source code for
>
> libdispatch is open source:
> https://github.com/apple/swift-corelibs-libdispatch
> <https://github.com/apple/swift-corelibs-libdispatch>

On 23 Aug 2018, at 04:30, Uli Kusterer <email@hidden> wrote:
>
>
> I recall hearing from someone at Apple that they basically ported GCD to
> Linux for the Swift Linux release ... have you looked whether that code might
> give any clues about what may be happening on macOS?


Interesting. That isn’t quite the same libdispatch that’s used on the macOS by
the look of things, but it does appear to have things merged across from the
macOS version. It looks, from a cursory examination, as if the macOS
functionality is built on top of a kernel “work queue” implementation that
lives inside the non-open-source pthread.kext. (I’m sure I’m not the only one
to have noticed that quite a bit of functionality has been moved from open
source parts of the macOS to closed-source libraries and KEXTs; personally I
find this a disappointing development, as it makes debugging and developing
software harder if it’s impossible to inspect the source code.)

Anyway, from what I can see it seems highly unlikely that there will be any
background threads to monitor file descriptors, at least on the macOS.

Kind regards,

Alastair.

--
http://alastairs-place.net

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Carbon -> Cocoa (From: Casey McDermott <email@hidden>)
 >Re: Carbon -> Cocoa (From: Sean McBride <email@hidden>)
 >Re: Carbon -> Cocoa (From: Stephane Sudre <email@hidden>)
 >Re: Carbon -> Cocoa (From: Jens Alfke <email@hidden>)
 >Re: Carbon -> Cocoa (From: Jean-Daniel <email@hidden>)
 >Re: Carbon -> Cocoa (From: Mike Crawford <email@hidden>)
 >Re: Carbon -> Cocoa (From: Alastair Houghton <email@hidden>)
 >Re: Carbon -> Cocoa (From: Jens Alfke <email@hidden>)
 >Re: Carbon -> Cocoa (From: Alastair Houghton <email@hidden>)
 >Re: Carbon -> Cocoa (From: Saagar Jha <email@hidden>)

  • Prev by Date: Re: Carbon -> Cocoa
  • Next by Date: Delayed perform never performing
  • Previous by thread: Re: Carbon -> Cocoa
  • Next by thread: Re: Carbon -> Cocoa
  • Index(es):
    • Date
    • Thread