pike.git / lib / modules / Thread.pmod

version» Context lines:

pike.git/lib/modules/Thread.pmod:600: Inside #if constant(thread_create)
   protected Handler aquire_thread()    {    object lock = mutex->lock();    while( !sizeof(free_threads) )    {    if( sizeof(threads) < max_num_threads )    {    threads += ({ Handler() });    free_threads += ({ threads[-1] });    } else { -  ft_cond->wait(mutex); +  ft_cond->wait(lock);    }    }    object(Handler) t = free_threads[0];    free_threads = free_threads[1..];    return t;    }          protected void dispatcher()    {