• 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
GUI threading question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GUI threading question


  • Subject: GUI threading question
  • From: email@hidden
  • Date: Mon, 2 Feb 2009 10:49:11 -0500 (EST)
  • Importance: Normal

It has long been my understanding that in order to keep a GUI from
freezing in Cocoa during LONG methods you have to create a
NSOperationQueue and load the method as a NSInvocationOperation as seen
here:

- (IBAction)launchBigTask:(id)sender
{
	NSInvocationOperation* theOp = [[NSInvocationOperation alloc]
initWithTarget:self selector:@selector(myBigMethod:) object:nil];

	[myOpQueue addOperation:theOp];
}

-----------------

I was looking at another developers (Drew
McCormick)(http://www.macresearch.org/node/4567) code recently in a
scientific multi-processing example, and he seems to achieve the same GUI
independence without launching a NSInvocationOperation?

-----------------Why doesn't his GUI lock?

If I could duplicate this it would allow me to us NSOperationQueue to
multi-process a critical loop in my code, and then issue the
waitUntilAllOperationsAreFinished to wait for those ops to finish before
loading a shared array with new data and running loop again .

Is there another way to keep GUI active?

Thankyou,

Ron Jurincie



_______________________________________________

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: GUI threading question
      • From: Kyle Sluder <email@hidden>
    • Re: GUI threading question
      • From: Scott Ribe <email@hidden>
  • Prev by Date: Re: becomeFirstResponder override issue
  • Next by Date: Re: [OT] Localizing an App or Plugin
  • Previous by thread: Re: [OT] Localizing an App or Plugin
  • Next by thread: Re: GUI threading question
  • Index(es):
    • Date
    • Thread