i am trying to make an app with plugin system. user can click button on app to start and stop plugin running. i choose the libloading way for best performance and largest rust crate availability.
when user click start button, the host spawn new thread to load and start plugin function. but when user click stop button, running thread can't be simply canceled.
it seems i need to message plugin thread it's time to stop, and in plugin code, there must be listener on the message, that do simple panic on receive.
i don't know if it's the right way to go, willing to hear your advice.