Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep the YStore task group alive #42

Merged
merged 1 commit into from
May 4, 2024

Conversation

davidbrochart
Copy link
Collaborator

No description provided.

@@ -356,10 +366,11 @@ async def start(
self._task_group.start_soon(self._init_db)
task_status.started()
self.started.set()
await self.stopped.wait()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to make the start method blocking here? In websocketServer, we have used self._task_group.start_soon(self._stopped.wait) to keep the task group alive. Should we use this pattern?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's equivalent, in WebsocketServer the task group context manager doesn't exit as long as tasks are running.

@davidbrochart davidbrochart merged commit e13521d into jupyter-server:main May 4, 2024
7 of 8 checks passed
@davidbrochart davidbrochart deleted the ystore-start branch May 6, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants