How do I overheat my iphone by running multiple processes in code
I saw some ha开发者_如何学Cndwarmer apps and I guess it's very easy to make something like that by running multiple processes at once. Has anyone had a go on it? If you did, can you share it with us here?
Just find some endlessly repeating calculation (like something that finds the digits in Pi for example), and launch three or four threads performing them - either an NSOperationQueue with a concurrent count set to four, or just spawn off threads yourself.
The key is to make the system work in some way, you can either exercise the CPU or the GPU (or both).
You can easily spawn several threads:
- (void) reticulateSplines {
while (1) ;
}
- (void) spawnThreads {
for (int i=0; i<kNumberOfThreads; i++)
[self performSelectorInBackground:@selector(reticulateSplines)
withObject:nil];
}
That’s not several processes and probably does not warm the machine up, though.
精彩评论