• 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: async NSOperation and NSOperationQueue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: async NSOperation and NSOperationQueue


  • Subject: Re: async NSOperation and NSOperationQueue
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 9 Jun 2008 20:01:44 -0700


On 8 Jun '08, at 5:26 PM, Wayne Shao wrote:

So what exactly I should do in the start() method??

Whatever you need to do to start the operation. It should return ASAP since it's not being run on a background thread.


If I create a thread,
does the operation queue still enforce maxConcurrentOperationCount or I need
to worry about that in my implementation?

If you have to start a new thread, you probably just want to use the default synchronous NSOperation mode. The concurrent mode is for when your code is asynchronous — for example, you're using NSURLConnection and kick off the connection in the -start method, and then set yourself as the delegate and wait for callbacks.


But the answer to your question is yes — the queue will only allow a fixed number of operations to be running at once, sync or async.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >async NSOperation and NSOperationQueue (From: "Wayne Shao" <email@hidden>)

  • Prev by Date: Re: symbol(s) not found
  • Next by Date: Re: 3rd Party Nonsense (was Re: Regular Expressions?)
  • Previous by thread: Re: async NSOperation and NSOperationQueue
  • Next by thread: Bring app to front
  • Index(es):
    • Date
    • Thread