Re: Notification handling without run loop of a primary thread
site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Dec 2, 2005, at 3:08 PM, Vladimir Magaziy wrote: Hi all, HTH. Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDkL6qedHYW7bHtqIRAkNvAJ9vdNCt63GsLk0eTNzReiXsWXeIrgCgygkb wup2rTUyHJZTcVkF2xMkyXA= =p17F -----END PGP SIGNATURE----- _______________________________________________ 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... I am trying to handle distributed notifications in a CoreFoundation Tool that does not run a run loop of its primary thread (actually, it is the requirement). I can not find any solution that works, so I ask you about possibility to do in general. I thought that it is possible to track notifications using a run loop of a separate thread (see code snippet below), but CFRunLoopRun function does not run a thread run loop, it simply returns a control and a thread finishes. I guess that I do not initialize a thread run loop correctly, so please suggest me the appropriate way to run it and force to handle notifications. 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Brian Bergstrand