Sleep between deferred requests on paused handler
It looks like a launcher can busy loop and starve other threads from running when a provider is at quota and a lot of requests are deferred. Sleep 250ms between deferred requests to not hog the CPU. Change-Id: I3dbf74ee2fe50308d1b5b286f091a052ec6c5ef9
This commit is contained in:
parent
3fa6821437
commit
e959b4efc1
@ -238,6 +238,7 @@ class PoolWorker(threading.Thread, stats.StatsReporter):
|
||||
|
||||
if self.paused_handlers and not reasons_to_decline:
|
||||
self.log.debug("Handler is paused, deferring request")
|
||||
time.sleep(0.25)
|
||||
continue
|
||||
|
||||
# At this point, we are either unpaused, or we know we
|
||||
|
Loading…
x
Reference in New Issue
Block a user