0ff9c1a sanlock: Shrink thread pool when there is no work

1 file Authored by nsoffer 3 years ago, Committed by teigland 3 years ago,
1 file changed. 4 lines added. 0 lines removed.
    sanlock: Shrink thread pool when there is no work
    
    When the thread pool has no work to do, and we have enough free workers,
    other worker threads will terminate.
    
    Without this change, when using large number of worker threads, the
    thread pool grows to max_worker_threads workers, and never shrink down.
    With this change, the pool quickly shrinks down, but we always have
    enough free worker threads for serving new requests.
    
    Signed-off-by: Nir Soffer <nsoffer@redhat.com>
    
        
file modified
+4 -0