• 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
Re: Thread safety of Bonjour Cocoa classes? (NSNetService, etc.)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread safety of Bonjour Cocoa classes? (NSNetService, etc.)


  • Subject: Re: Thread safety of Bonjour Cocoa classes? (NSNetService, etc.)
  • From: Sean McBride <email@hidden>
  • Date: Thu, 14 Feb 2013 16:07:13 -0500
  • Organization: Rogue Research Inc.

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                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >Thread safety of Bonjour Cocoa classes? (NSNetService, etc.) (From: Sean McBride <email@hidden>)
 >Re: Thread safety of Bonjour Cocoa classes? (NSNetService, etc.) (From: Chris Parker <email@hidden>)

  • Prev by Date: Re: Thread safety of Bonjour Cocoa classes? (NSNetService, etc.)
  • Next by Date: "The Objective-C Programming Language"
  • Previous by thread: Re: Thread safety of Bonjour Cocoa classes? (NSNetService, etc.)
  • Next by thread: "The Objective-C Programming Language"
  • Index(es):
    • Date
    • Thread