• Nils Goroll's avatar
    wake up herder from sleeping after destroying, sleep for longer · 5e5b4d59
    Nils Goroll authored
    Previously, after sending a thread to varnish heaven, the herder slept
    for wthread_destroy_delay unconditionally. Instead, we now wait on the
    cv so we get woken up in case we run dry during the delay.
    
    This change is relevant proportionally to the value of
    wthread_destroy_delay if the spread between thread_pool_min and
    thread_pool_max is big and varnish is exposed to sudden traffic peaks.
    
    IOW, it will probably be only relevant for high performance setups.
    
    Also, we now sleep for thread_pool_timeout unless a shorter delay is
    warranted. This will delay the effect of thread parameter changes for
    up to thread_pool_timeout seconds unless the pool runs dry, in which
    case they will become effective immediately.
    5e5b4d59
r01490.vtc 844 Bytes