• Poul-Henning Kamp's avatar
    Overhaul the thread-pool herding code. · 7e25234d
    Poul-Henning Kamp authored
    NB: Changes to parameter defaults & units included in this commit!
    
    I tried to apply some queuing theory to this problem and as much as
    I admire Agner Krarup Erlang, his math isn't much help when you don't
    know any of the relevant metrics for your queue.
    
    Instead I took a much simpler approach:  "If we fail to get a thread,
    we probably need more threads", and have rewritten the herder to to
    react faster and more reliably to such events.
    
    I went over the parameters for thread-pools and normalized timeouts
    to seconds rather than milliseconds (beware!) and polished descriptions
    etc.
    7e25234d
mgt_pool.c 7.67 KB