Closed chamons closed 1 year ago
Thank you, let me look into this.
Thank you for the report. This was indeed not intentional and has been fixed in 0.6.3. The wait function should always return if the library was reloaded, no matter if a call into it was made or not.
Thanks for the super quick turn around!
While retrofiring my project to use hot-lib-reloader-rs I ran into a very confusing issue, the notification from
wait_for_about_to_reload
never came back to me. I spent 2 hours comparing my project to the sample, refactoring, debugging, etc.It turns out that if you don't call into any function in your hot reload API consistently (or at least once?) you don't get any notification.
My use case involves waiting for a reload, and then doing a bunch of work. I was not calling any API before the notification.
Once I created an empty API that I called in my message loop everything started working.
I'm filing this to suggest a documentation change to explain how\when the listening occurs.