Fix minor issues
This commit is contained in:
parent
12f4e5c0bf
commit
d5b9564d7a
|
@ -209,6 +209,7 @@ class FIFOKernel(BaseKernel):
|
||||||
def throw(self, task: Task, err: BaseException):
|
def throw(self, task: Task, err: BaseException):
|
||||||
if task.done():
|
if task.done():
|
||||||
return
|
return
|
||||||
|
self.release(task)
|
||||||
self.handle_errors(partial(task.coroutine.throw, err), task)
|
self.handle_errors(partial(task.coroutine.throw, err), task)
|
||||||
|
|
||||||
def reschedule(self, task: Task):
|
def reschedule(self, task: Task):
|
||||||
|
|
|
@ -310,6 +310,7 @@ async def run_in_worker(
|
||||||
# about our merry way, hoping the thread dies eventually I guess
|
# about our merry way, hoping the thread dies eventually I guess
|
||||||
daemon=cancellable,
|
daemon=cancellable,
|
||||||
).start()
|
).start()
|
||||||
|
# Ensure we get poked by the worker thread
|
||||||
await wakeup2.reader.receive(1)
|
await wakeup2.reader.receive(1)
|
||||||
# Wait for the thread to terminate
|
# Wait for the thread to terminate
|
||||||
await terminate.wait()
|
await terminate.wait()
|
||||||
|
|
Loading…
Reference in New Issue