开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜