Hey guys! I'm messing around with threads a little bit. Now consider this: I have a main thread. I start a new thread. In it's entry-point method, I want to make a run loop. Now the documentation tells meh that I have to have a input source. Otherwise my run loop exits immediately. bad. okay. but I have no other input source than my performSelector... method calls. After the thread is started, there comes a performSelector method that will kick in another method on that thread after some delay. inside that method another performSelector call happens, and so on. each with a delay between 0.1 and 1 sec. So a repeatedly firing timer is senseless right ;-)
How could I set up that run loop so it keeps alive to receive kicks from performSelector? I want the thread to sleep when there's nothing to do. but when a performSelector kick is comming in his butt, I want that the thread wakes up and works.
Any suggestions, anyone?