Skip to content

Refactor signal handling to support custom cleanup callbacks - #28

Open
lstoex wants to merge 2 commits into
mujocolab:mainfrom
lstoex:feature/custom-cleanup-hook
Open

Refactor signal handling to support custom cleanup callbacks#28
lstoex wants to merge 2 commits into
mujocolab:mainfrom
lstoex:feature/custom-cleanup-hook

Conversation

@lstoex

@lstoex lstoex commented Jul 27, 2026

Copy link
Copy Markdown

Thanks for the wonderful repo!
I noticed that the viewer takes full possession of the ViserServer passed in during construction. This means when the viewer is shut down, it kills the server, no questions asked. This pr introduces custom cleanup callbacks so that we can clean up some resources before the server is killed.

Personally, I'd find it helpful to let the user decide if the server is to be shut down on exit or not. When prototyping stuff in a notebook, I found it to be quite annoying that a new ViserServer with ever-increasing port number is created.

…leanup callbacks to the constructor before the server is stopped.

@kevinzakka kevinzakka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @lstoex!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants