I have a code reloading system similar to the one detailed in Day 21 and I've recently been adapting some of my code to use
thread_local globals. I was surprised to find that the addition of a
thread_local variable is enough to stop the code reloading from working.
In this Video, I start by compiling the program without a
thread_local and test the code reloading to see that it works. I then quit the program and recompile with a
thread_local to then see that code reloading no longer works (note that a second
"TheGlobalInt: ..." line does not appear in the bottom left).
Does anyone have any thoughts as to why this might be? Tested with Apple Clang 14 on macOS 10.12.