<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font size="-1"><font face="Helvetica, Arial, sans-serif">Hi </font></font><font
size="-1"><font face="Helvetica, Arial, sans-serif"><font
size="-1"><font face="Helvetica, Arial, sans-serif">Jonathon/Ross</font></font>,<br>
<br>
Thanks for the info Jonathon, humbly missed this, I suspect the
heap corruption throw me whilst performing the tests.<br>
For it's worth, using the libraries for client sink, setlocale
is the only call which fails in a multi-threaded environment on
a current Windows 10 platform.<br>
<br>
I've two options, modify the code to add a lock, which I do not
want to do, or understand the consequences of defining
LOCALE_NOT_USED.<br>
As a final note on this email chain, can you tell me what those
considerations may be if setlocale is not called?<br>
What issues may we run into as a client or server endpoint using
the libraries not calling this function?<br>
<br>
Appreciated,<br>
Richard.<br>
</font></font><br>
<div class="moz-cite-prefix">On 26/10/2021 21:07, Ross Finlayson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:697BE6CD-A94C-4046-9425-16D77647E3E0@live555.com">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On Oct 27, 2021, at 5:29 AM, Jonathan Brady via live-devel <a class="moz-txt-link-rfc2396E" href="mailto:live-devel@us.live555.com"><live-devel@us.live555.com></a> wrote:
• On Windows setlocale is not thread safe
• <a class="moz-txt-link-freetext" href="https://social.msdn.microsoft.com/Forums/windowsserver/en-US/b46aa226-d337-43c3-8d15-135f6fca9b53/setlocale-behavior-in-multithreaded-applications?forum=vcgeneral">https://social.msdn.microsoft.com/Forums/windowsserver/en-US/b46aa226-d337-43c3-8d15-135f6fca9b53/setlocale-behavior-in-multithreaded-applications?forum=vcgeneral</a>
• It hasn't been thread safe since Visual C++ 2012.
• <a class="moz-txt-link-freetext" href="https://www.tolon.co.uk/2014/10/beware-setlocale/">https://www.tolon.co.uk/2014/10/beware-setlocale/</a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Thanks for the info. Although we can try to make our code safe to run in multiple threads, there’s not a lot we can do if an underlying language runtime library or OS call is not thread safe.
Another reason to avoid threads, if possible.
Ross Finlayson
Live Networks, Inc.
<a class="moz-txt-link-freetext" href="http://www.live555.com/">http://www.live555.com/</a>
_______________________________________________
live-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a>
<a class="moz-txt-link-freetext" href="http://lists.live555.com/mailman/listinfo/live-devel">http://lists.live555.com/mailman/listinfo/live-devel</a>
</pre>
</blockquote>
<br>
<div class="moz-signature"><font size="2" face="calibri"
color="black">
Best Regards,<br>
Richard Lince,<br>
Founder & Managing Director<br>
<br>
<a href="https://www.bluebox.video">bluebox.video</a> <br>
+44(0)7841665146<br>
</font><br>
<img alt="logo" src="cid:part2.5B75755A.03EBF6AE@bluebox.video"></div>
</body>
</html>