Open J-F-Liu opened 2 years ago
I'm doing some restructuring to make this work. I thought I could get away with using once_cell for caching, but to enable this use case I think I'll have use locks or atomics instead. I may have to remove function pointer caching for now so I can get the reloading working more quickly. Hopefully when I've released the next version you will be able to just call the function again after freeing the library and it should reload the library automatically.
Thanks, maybe it's better to be implemented separately. I already implemented this by myself, but the function names are hard coded.
I need to reload a dll file to do some initialization agian. After call the trait method
WindowsDll::free()
,WindowsDll::ptr()
andWindowsDllProc::proc()
still return cached result. It would be good to have a method to reload dll.