mirror of
https://opendev.org/x/pyghmi
synced 2026-03-28 22:03:30 +00:00
Forget sessions with poor connectivity that should be forgotten
The only way for a registered waiter for general IO activity to be forgotten was for it to be satisfied. Unfortunately, in a bad scenario, it would sit and be relatively worthless. In a large environment, this could accrue and those stubbed out events become a large headache. Change-Id: I1e2c7afa1dc5c9e2adeb26f2e4cd7a7b7b9709ed
This commit is contained in:
@@ -124,12 +124,15 @@ def define_worker():
|
||||
# deadline if they still have time waiting, or
|
||||
# if they have expired, wake them now to let them
|
||||
# process their timeout
|
||||
for w in directediowaiters[d]:
|
||||
for idx, w in enumerate(list(directediowaiters[d])):
|
||||
ltimeout = w[0] - _monotonic_time()
|
||||
if ltimeout < 0:
|
||||
w[1].set() # time is up, wake the caller
|
||||
del directediowaiters[d][idx]
|
||||
elif ltimeout < timeout:
|
||||
timeout = ltimeout
|
||||
if not directediowaiters[d]:
|
||||
del directediowaiters[d]
|
||||
while ioqueue:
|
||||
workitem = ioqueue.popleft()
|
||||
# order: function, args, list to append to , event to set
|
||||
|
||||
Reference in New Issue
Block a user