On Thu, 14 Feb 2013 12:47:13 -0800, Chris Parker said:

>NSNetService (and NSNetServiceBrowser) automatically schedules itself on
>the run loop of the thread it's being created on. If the run loop isn't
>being spun (e.g. on a thread created by detaching a pthread or an
>NSThread) then you won't get callbacks.

Chris,

Thanks for your reply.  I create an NSThread with 
initWithTarget:selector:object: then from the thread's entry function I do 
[[NSRunLoop currentRunLoop] run] to create and run its runloop forever.  The 
API to my class uses performSelector:onThread: to do all work (like the 
creation of the NSNetService and NSNetServiceBrowser) on my thread.  Does that 
sound kosher?

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to