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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to