• 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: Newbie query re multithreading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie query re multithreading


  • Subject: Re: Newbie query re multithreading
  • From: Jonathan Dann <email@hidden>
  • Date: Tue, 18 Aug 2009 16:36:47 +0200

FWIW you can't always be sure that NSOperationQueue will be using a thread per operation. The number of active operations (I explicitly don't say "threads" here) depends on system contention. Are your operations dependent on each other or using shared resources? Are you setting -[NSOperationQueue maxConcurrentOperationCount:] ? If each operation is independent then simply throw as many as you like at the queue without setting the maxConcurrentOperationCount.

You may even find that NSOperationQueue/NSOperation allows you to split up your calculations into smaller chunks than 1 per CPU (or effective cores).

Can you post some example code that can shed some more light on what you're doing?

Jonathan

http://madebysofa.com

_______________________________________________

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: Newbie query re multithreading
      • From: "I. Savant" <email@hidden>
References: 
 >Newbie query re multithreading (From: "McLaughlin, Michael P." <email@hidden>)

  • Prev by Date: Re: Mac access to iPhone Document Directory
  • Next by Date: Re: Newbie query re multithreading
  • Previous by thread: Newbie query re multithreading
  • Next by thread: Re: Newbie query re multithreading
  • Index(es):
    • Date
    • Thread