News for hackers. Stuff that matters.
Re:C++ Exit-Time Destructors by alexey-salmin on Saturday March 23, 2024 @06:10AM (#39798744)
I did and this looks like a library design issue, which is now impossible to solve without breaking the ABI. I argue though that a design that doesn't suffer from this issue exists because there is a way to serialize all these operations in a safe way.
Re:C++ Exit-Time Destructors by rwmj on Saturday March 23, 2024 @07:53AM (#39799242)
Thread-local storage + destructors is, as far as we can tell, impossible to use safely by any significantly complicated program or library. It's largely because of how Linux shoots down programs on exit by killing the threads in any order without notice. It could be fixed in Linux, although I can also understand why Linux developers wouldn't want to do that as it would push significant complexity there.