• 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
grand central dispatch and notification port sources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grand central dispatch and notification port sources


  • Subject: grand central dispatch and notification port sources
  • From: Joel Reymont <email@hidden>
  • Date: Wed, 10 Mar 2010 22:34:10 +0000

Is it possible to add a notification port as a source in Grand Central Dispatch?

I'm looking to replace these three lines of code:

gNotifyPort = IONotificationPortCreate(masterPort);
runLoopSource = IONotificationPortGetRunLoopSource(gNotifyPort);
CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, kCFRunLoopDefaultMode);

GCD has DISPATCH_SOURCE_TYPE_MACH_RECV and DISPATCH_SOURCE_TYPE_MACH_SEND source types that I can pass to dispatch_source_create(). Can I just pass the notification port as a handle?

	Thanks, Joel

---
http://es.linkedin.com/in/joelreymont

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: grand central dispatch and notification port sources
      • From: Damien Sorresso <email@hidden>
  • Prev by Date: inter-thread communication
  • Next by Date: Re: grand central dispatch and notification port sources
  • Previous by thread: Re: inter-thread communication
  • Next by thread: Re: grand central dispatch and notification port sources
  • Index(es):
    • Date
    • Thread