• 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
infinite loop in another thread destroy g4 CPU
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

infinite loop in another thread destroy g4 CPU


  • Subject: infinite loop in another thread destroy g4 CPU
  • From: Yorh <email@hidden>
  • Date: Wed, 5 Apr 2006 09:59:46 +0200

Dear list,

I have a strange problem.
I made a second thread in my app in this way:

[NSThread detachNewThreadSelector:@selector(checkKeepAlive:) toTarget:self withObject:nil];

After it i start an infinite loop (as I usually do) like:

-(void)checkKeepAlive:(id)owner{

	for (; ; ){

	// code
	}
}

But the app eat 76% on a G5 CPU and 100% on G4 and about 85% on Intel core duo....
This is very strange in my thinking because this is a standard loop... and a lot of apps use this strategy in a secondary thread.


Where is the mistake?

Thank you all
Yorh

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: infinite loop in another thread destroy g4 CPU
      • From: William Bumgarner <email@hidden>
    • Re: infinite loop in another thread destroy g4 CPU
      • From: Robert Tillyard <email@hidden>
    • Re: infinite loop in another thread destroy g4 CPU
      • From: Ondra Cada <email@hidden>
    • Re: infinite loop in another thread destroy g4 CPU
      • From: Christian Stieber <email@hidden>
  • Prev by Date: Modifying Core Data fields Programatically
  • Next by Date: Re: Modifying Core Data fields Programatically
  • Previous by thread: Re: Modifying Core Data fields Programatically
  • Next by thread: Re: infinite loop in another thread destroy g4 CPU
  • Index(es):
    • Date
    • Thread