scriptstdstring setlocale multithread issue (crashes) and proposed fix
gamedev.net
Hi,I have noticed that the string to float conversion make multithreaded programs crash when used intensively in multiple threads in apps that are using non-C locale. This is due to the fact that setlocale is not thread safe at all.Please find below a proposed patch to overcome this issue (using uselocal instead, with a custom implementation for windows as it does not exist there):Index: scriptstdstring/scriptstdstring.cpp==============
0 Comments ·0 Shares ·130 Views