If i set the thread as detached, that I think is that I need (same that the old code that I sent)
On 9/8/2010 4:56 AM, Oscar Pernas wrote:You are going to hit limits on any platform if you don't reap the threads you spawn.
> Im using apr to throw new threads for making callbacks. My problem is that when I have
> made exactly 632 calls to the function throwOnMessage, the thread onMessage is not throwed
> by it anymore, the thread is not created (I've put traces into the first instruction and
> it is not executed). This code shuld work?
apr_thread_join is going to block on the apr_thread_exit. In APR, deleting (or
just clearing) the pool you used to create the thread (and thread attributes)
will then release all resources.