iphone - how do I make a thread runs faster
<p>I have two methods that I need to run, lets call them metA and metB.</p>

<p>When I start coding this app, I called both methods without using threads, but the app started freezing, so I decided to go with threads.</p>

<p>metA and metB are called by touch events, so they can occur any time in any order. They don't depend on each other.</p>

<p>My problem is the time it takes to either threads start running. There's a lag between the time the thread is created with </p>

<pre><code>[NSThread detachNewThreadSelector:@selector(.... bla bla
</code></pre>

<p>and the time the thread starts running. </p>

<p>I suppose this time is related to the amount of time required by iOS to create the thread itself. How can I speed this? If I pre create both threads, how do I make them just do their stuff when needed and never terminate? I mean, a kind of sleeping thread that is always alive and works when asked and sleeps after that?</p>

<p>thanks. </p>
