Callback functions for shutdown()?
Hi, I encountered an issue that seems need some customization to the shutdown() function:
I have a separate thread initiated and detached before polyscope::init() -- a server listening from other software for sending geometries in.
The server use a shared_ptr<UIState> which is also used in the main().
Now if I close the main window of polyscope, there's always an error pointing to the ~shared_ptr<UIState>.
I'm not 100% sure what happened there, but it seems the main thread delete the shared_ptr<UIState> before the other thread exit. And when the server tries to delete that shared_ptr, it points to nowhere?
I assume manually exit the separate thread before the main should help.
Hi! I'm not sure I understand this in terms of Polyscope. Do you think there's a bug on the Polyscope side? Or what is the new Polyscope feature you would want, a callback function that gets called on shutdown()?
I'm not sure if this is a bug on the polyscope side... but a callback func for shutdown() definitely help.
But as I've used a different mechanism to avoid the issue here, this is not urgent for me at the moment.
You may consider the proposal from polyscope's own good.