pike.git / lib / modules / Thread.pmod

version» Context lines:

pike.git/lib/modules/Thread.pmod:511: Inside #if constant(thread_create)
   array(object|array(function|array)) q;    object key = job_mutex->lock();    ready = 1;    while( 1 )    {    cond->wait(key);    if( q = job )    {    mixed res, err;    int st = gethrtime(); -  if( err = catch(res = q[1][0]( @q[1][1] )) && q[0]) +  +  err = catch(res = q[1][0]( @q[1][1] )); +  +  if( q[0] ) +  { +  if( err )    ([object]q[0])->provide_error( err ); -  else if( q[0] ) +  else    ([object]q[0])->provide( res ); -  +  }    object lock = mutex->lock();    free_threads += ({ this });    lock = 0;    st = gethrtime()-st;    total_time += st/1000.0;    handled++;    job = 0;    if( st > max_time )    max_time = st;    ft_cond->broadcast();