Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

DM-40638: Convert to Safir's AsyncMultiQueue #44

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

rra
Copy link
Member

@rra rra commented Sep 6, 2023

Use the AsyncMultiQueue data structure from Safir to manage the progress events. This is a richer version of the data structures that were being used internally.

Rely on the spawner calling end() in its finally block and don't poll the spawner task for completion inside the progress iterator. The Safir AsyncMultiQueue has a mechanism for explicitly indicating the end of the data in the queue, which should serve the same purpose.

Simplify the way that progress events are checked in the test suite and add an explicit test for reading the events of a spawn after the spawn has completed.

@rra
Copy link
Member Author

rra commented Sep 6, 2023

This PR will alas have to wait until we have a JupyterHub that runs under Python 3.11. Unfortunately, they're using Ubuntu 22.04 as the base for even JupyterHub 4, which only comes with Python 3.10.

Use the AsyncMultiQueue data structure from Safir to manage the
progress events. This is a richer version of the data structures
that were being used internally.

Rely on the spawner calling end() in its finally block and don't
poll the spawner task for completion inside the progress iterator.
The Safir AsyncMultiQueue has a mechanism for explicitly indicating
the end of the data in the queue, which should serve the same
purpose.

Simplify the way that progress events are checked in the test suite
and add an explicit test for reading the events of a spawn after the
spawn has completed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant