That's because your "performSelector:
" is happening on your current (main) thread.
If you add a line like "NSLog( @"in main function");
" inside that "while
" loop, as soon as your performSelector fires up, it should stop.
You need to do the performSelector on another (detached) thread, or use a block. Some blocks can use "stop" Booleans in their arguments.