infinite loop in another thread destroy g4 CPU
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