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

async NSOperation and NSOperationQueue


  • Subject: async NSOperation and NSOperationQueue
  • From: "Wayne Shao" <email@hidden>
  • Date: Sun, 8 Jun 2008 17:26:12 -0700

I want to use NSOperationQueue to have at most 5 NSOperation running.
However, my operation is asynchronous.

>From the documentation:

If you are creating a concurrent operation, you need to override the
following methods:

   -

   start
   -

   isConcurrent
   -

   isExecuting
   -

   isFinished   ( I will return YES after the operation callback is invoked)


In your start method, you must prepare the operation for execution, which
includes preparing the runtime environment for your operation. (For example,
if you wanted to create a thread yourself, you would do it here.)

So what exactly I should do in the start() method?? If I create a thread,
does the operation queue still enforce maxConcurrentOperationCount or I need
to worry about that in my implementation?


--
Wayne Shao
_______________________________________________

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: async NSOperation and NSOperationQueue
      • From: Jens Alfke <email@hidden>
    • Re: async NSOperation and NSOperationQueue
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Garbage collector vs variable lifetime
  • Next by Date: Re: Garbage collector vs variable lifetime
  • Previous by thread: Re: Using NSTrackingArea on overlay child windows
  • Next by thread: Re: async NSOperation and NSOperationQueue
  • Index(es):
    • Date
    • Thread