Sleeping tasks are now awoken after the parent crashes

This commit is contained in:
Nocturn9x 2023-05-12 09:07:00 +02:00
parent 724b5c98ba
commit 727848ada8
Signed by: nocturn9x
GPG Key ID: 8270F9F467971E59
1 changed files with 2 additions and 0 deletions

View File

@ -666,6 +666,8 @@ class FIFOKernel:
if task is not self.current_task:
task.joiners.add(self.current_task)
if task.done():
for joiner in task.joiners:
self.paused.discard(joiner)
self.run_ready.extend(task.joiners)
def spawn(self, func: Callable[..., Coroutine[Any, Any, Any]], *args, **kwargs):