• 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: NSOperationQueue broken?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOperationQueue broken?


  • Subject: Re: NSOperationQueue broken?
  • From: "Colin Barrett" <email@hidden>
  • Date: Thu, 30 Oct 2008 19:16:22 -0700

On Thu, Oct 30, 2008 at 5:30 PM, Michael Ash <email@hidden> wrote:
> Based on the state of the program when it crashes, it appears that the
> problem is caused by a race condition which occasionally causes two of
> the worker threads that NSOperationQueue spawns to dequeue and execute
> the same NSOperation. Since an NSOperation is only supposed to run
> once, things fall down go boom. This is just a theory, mind, and I'm
> not sure of it yet.

I'm not sure it would help, but it might. You could try using the
dependency mechanism in addition to setting maxConcurrentOperations to
1. Keep track of the last NSOperation in your for loop and assign in
as you go.

If that fixes it, it could be a race in maxConcurrentOperations.

This is all highly speculative.
-Colin
_______________________________________________

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

  • Follow-Ups:
    • Re: NSOperationQueue broken?
      • From: "Michael Ash" <email@hidden>
References: 
 >NSOperationQueue broken? (From: "Michael Ash" <email@hidden>)
 >Re: NSOperationQueue broken? (From: Quincey Morris <email@hidden>)
 >Re: NSOperationQueue broken? (From: "Michael Ash" <email@hidden>)
 >Re: NSOperationQueue broken? (From: Jamie Johnson <email@hidden>)
 >Re: NSOperationQueue broken? (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: When and how often do you mix C++ with Objective C in your project?
  • Next by Date: Re: Need help programatically wiring up an NSTreeController to an NSOutlineView
  • Previous by thread: Re: NSOperationQueue broken?
  • Next by thread: Re: NSOperationQueue broken?
  • Index(es):
    • Date
    • Thread