Re: Concurrent tasks are getting hung up
Re: Concurrent tasks are getting hung up
- Subject: Re: Concurrent tasks are getting hung up
- From: Kyle Sluder <email@hidden>
- Date: Fri, 10 Oct 2014 08:00:02 -0700
> On Oct 10, 2014, at 6:42 AM, Steve Mills <email@hidden> wrote:
>
> I've only created one NSOperationQueue and added many NSInvocationOperation to it.
NSOperationQueue works by dispatching your blocks to the global async GCD queue. If you send a thousand blocks to be async processed at once, GCD will keep spinning up threads to try to service them until it exhausts the thread limit and your process deadlocks.
It sucks, but you have to be judicious in the number of blocks you submit to the global queue. Set a max operation count on your NSOperationQueue.
> On Oct 10, 2014, at 6:55 AM, Steve Mills <email@hidden> wrote:
>
> I'll hold off on reporting a bug until I can figure out if it's my fault or not. I asked before how I can find out which things are not thread-safe, but didn't get a reply on that. I don't see anything about thread safety in any of the headers for these:
https://developer.apple.com/library/mac/qa/qa1238/_index.html
--Kyle Sluder
_______________________________________________
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