grand central dispatch and notification port sources
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