site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com Hi Brian, Thanks for so quick reply.
The run loop needs an event source or it will just exit (as you witnessed). So, before calling CFRunLoopRun() you should register your notification handler with the run loop.
I noticed that when I add a notification observer in a primary thread using the CFNotificationCenterAddObserver the run loop works correctly without any source and CFRunLoopRun does not return a control, this in turn adds some entries to a run loop internal representation -- modes and current modes set entries, this set does not contain any source!: CFShow(CFRunLoopGetCurrent()), but if I do the same in a separate thread an internal run loop set contains appropriate entries, but its behavior are not the same. As I get, this is the one mechanism to register notification handler with a run loop. Would you please suggest me how should I initialize a run loop source you mentioned? Moreover, I have no idea about an infill of its context (I mean CFRunLoopSourceContext structure). Thanks again. Best regards, Vladimir Magaziy. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com