Shrinking of thread pools