From d5b9564d7a9a8f4f805b2d2173111d6402108a57 Mon Sep 17 00:00:00 2001 From: nocturn9x Date: Tue, 24 Oct 2023 15:53:25 +0200 Subject: [PATCH] Fix minor issues --- structio/core/kernels/fifo.py | 1 + structio/thread.py | 1 + 2 files changed, 2 insertions(+) diff --git a/structio/core/kernels/fifo.py b/structio/core/kernels/fifo.py index ba3e99b..e7fc740 100644 --- a/structio/core/kernels/fifo.py +++ b/structio/core/kernels/fifo.py @@ -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): diff --git a/structio/thread.py b/structio/thread.py index c2135ab..2fb95b7 100644 --- a/structio/thread.py +++ b/structio/thread.py @@ -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()