Why Thread-Local Storage causes problems
fasterthanlime opened this issue · 1 comments
fasterthanlime commented
Not sure how else to contact you, the README states:
Note that hot-reloading doesn't work at all if the library uses Thread Local Storage (TLS). This caused me headaches for quite some time figuring out why reloading would sometimes stop working. Any use of TLS will prevent hot-reloading from working, even with the unique copy trick. I'm not clear on why this should be the case, if you happen to know what's going on here please let me know!
I just wrote (in depth!) about this, you might find it interesting: https://fasterthanli.me/articles/so-you-want-to-live-reload-rust
Cheers!
irh commented
Wow! Thanks for sharing this, you really nailed it! I'll add a link to your post in the readme for future readers.