Skip to content

Commit

Permalink
Fixing testing error.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcschrg committed Feb 25, 2024
1 parent b620476 commit 4579fab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mango/util/scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ async def tasks_complete_or_sleeping(self):
# we need to recognize how many sleeping tasks we have in order to find out if all tasks are done
sleeping_tasks.append(scheduled_task)

def shutdown(self):
def shutdown(self, wait=True):
"""
Shutdown internal process executor pool.
"""
Expand All @@ -879,6 +879,6 @@ def shutdown(self):
event[1].set()
for task, _, _, _ in self._scheduled_tasks:
task.close()
self._process_pool_exec.shutdown(wait=True, cancel_futures=True)
self._process_pool_exec.shutdown(wait=wait, cancel_futures=True)
if self._manager is not None:
self._manager.shutdown()
2 changes: 1 addition & 1 deletion tests/unit_tests/util/scheduling_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ async def test_task_as_process_suspend():
except asyncio.exceptions.TimeoutError as err:
pass

scheduler.resume(marker)
scheduler.shutdown(wait=False)


@pytest.mark.asyncio
Expand Down

0 comments on commit 4579fab

Please sign in to comment.