Apply ugly hotfix to I/O manager

This commit is contained in:
Mattia Giambirtone 2024-03-19 22:22:34 +01:00
parent c85e3037e4
commit 5071399431
2 changed files with 4 additions and 1 deletions

View File

@ -270,6 +270,7 @@ class DefaultKernel(BaseKernel):
scope.timed_out = True
error = TimedOut("timed out")
error.scope = scope
scope.cancel()
self.throw(scope.owner, error)
def wakeup(self):

View File

@ -73,7 +73,9 @@ class SimpleIOManager(BaseIOManager):
current_time = kernel.clock.current_time()
deadline = kernel.get_closest_deadline()
if deadline == float("inf"):
deadline = 0
# FIXME: This delay seems to help throttle the calls
# to this method. Should we be calling it this often?
deadline = 0.01
elif deadline > 0:
deadline -= current_time
deadline = max(0, deadline)