• 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: Benjamin Stiglitz <email@hidden>
  • Date: Mon, 15 Sep 2008 12:05:35 -0400

Excerpts from John Love's message of Mon Sep 15 11:02:21 -0400 2008:
> I must be doing something terribly wrong, because when I start up the
> NSOperationQueue that does some time consuming calculations, I do not
> get back control of my application until after the lengthy calculation
> is complete.  Here are the relevant code snippets:

At what point is your app sticking? After you start all the queues, but
before you return from -startCalculation?

> - (void) calculateWorksheetRow:(id)data {
>       // takes a long time here
> }
>
>
> - (void) startQueue {
>     theQueue = [[[NSOperationQueue alloc] init] autorelease];
>     theOp = [[NSInvocationOperation alloc] initWithTarget:self
>
> selector:@selector(calculateWorksheetRow:)
>                                            object:nil];
>     [theQueue addOperation:theOp];
> }

You're starting one queue per operation, but you really want one queue
for all the operations.

-Ben
_______________________________________________

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: 
 >Re: async NSOperation and NSOperationQueue (From: John Love <email@hidden>)

  • Prev by Date: Can't get to work setDoubleAction on NSMatrix with NSButtonCell
  • Next by Date: Re: Do I Need Multiple NSArrayControllers For This?
  • Previous by thread: Re: async NSOperation and NSOperationQueue
  • Next by thread: Re: async NSOperation and NSOperationQueue
  • Index(es):
    • Date
    • Thread