So before this, if the thread limit was 0, then we'd call manager.add() in a loop many times, even though a thread will never be available.
Previously, requests were also handled in a blocking way if no thread was available. But this would result in a freeze if more concurrent connections, higher than the thread limit tried to create a connection. So now we just wait for a thread to be available instead, which removes the freeze.
So before this, if the thread limit was
0
, then we'd callmanager.add()
in a loop many times, even though a thread will never be available.Previously, requests were also handled in a blocking way if no thread was available. But this would result in a freeze if more concurrent connections, higher than the thread limit tried to create a connection. So now we just wait for a thread to be available instead, which removes the freeze.