Fix minor issues

This commit is contained in:
Mattia Giambirtone 2023-10-24 15:53:25 +02:00
parent 12f4e5c0bf
commit d5b9564d7a
Signed by: nocturn9x
GPG Key ID: 8270F9F467971E59
2 changed files with 2 additions and 0 deletions

View File

@ -209,6 +209,7 @@ class FIFOKernel(BaseKernel):
def throw(self, task: Task, err: BaseException):
if task.done():
return
self.release(task)
self.handle_errors(partial(task.coroutine.throw, err), task)
def reschedule(self, task: Task):

View File

@ -310,6 +310,7 @@ async def run_in_worker(
# about our merry way, hoping the thread dies eventually I guess
daemon=cancellable,
).start()
# Ensure we get poked by the worker thread
await wakeup2.reader.receive(1)
# Wait for the thread to terminate
await terminate.wait()