• 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: NSNotificationQueue & NSOperationQueue thread death
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNotificationQueue & NSOperationQueue thread death


  • Subject: Re: NSNotificationQueue & NSOperationQueue thread death
  • From: Michael Ash <email@hidden>
  • Date: Wed, 6 May 2009 13:35:09 -0400

On Wed, May 6, 2009 at 12:58 PM, Eric Hermanson <email@hidden> wrote:
>
> On May 6, 2009, at 12:24 AM, Michael Ash wrote:
>
>> Background threads, whether directly managed by you or
>> indirectly created by NSOperationQueue, do not use a runloop by
>> default.
>
> I did not realize that.  I knew threads created by the user did not use
> NSRunLoop, but I assumed threads created by NSOperationQueue did use
> NSRunLoop in some way.  So does this essentially mean that you cannot use
> the performSelector... functionality from inside an NSOperation main method
> because the NSOperationQueue thread that runs the operation does not have a
> run loop?

Can you be more specific? There are a *lot* of different
performSelector... methods. Most of them have nothing to do with the
current runloop and will thus work just fine. The "afterDelay"
variants work like a timer and do depend on the current thread running
a runloop, and so can't be used in that context unless you're running
the runloop manually.

Mike
_______________________________________________

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: 
 >NSNotificationQueue & NSOperationQueue thread death (From: Eric Hermanson <email@hidden>)
 >Re: NSNotificationQueue & NSOperationQueue thread death (From: Eric Hermanson <email@hidden>)
 >Re: NSNotificationQueue & NSOperationQueue thread death (From: Michael Ash <email@hidden>)
 >Re: NSNotificationQueue & NSOperationQueue thread death (From: Eric Hermanson <email@hidden>)

  • Prev by Date: Re: NSNotificationQueue & NSOperationQueue thread death
  • Next by Date: Re: +[NSApp nextEventMatchingMask:...] from other thread
  • Previous by thread: Re: NSNotificationQueue & NSOperationQueue thread death
  • Next by thread: Minimize All - sends what?
  • Index(es):
    • Date
    • Thread