<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
> Perhaps the network stack on Windows95/98 wasn't really reentrant?<BR><BR>
No. Your expectations are much too low.<BR>
Imagine if this was true. Then all Windows networking code<BR>
would have its own giant locks, and you'd read about this<BR>
in documentation and such.<BR>
<BR>I'm not sure of the terminology, but:<BR>
"Reentrant" is a strong word. "Thread safe"<BR>is a weaker more common one. For example strtok<BR>is not reentrant, but typically thread safe,<BR>through use of "thread locals".<BR>You can't use strtok in a nested for loop though.<BR>
 <BR>
It's not that the code is old per se. I think a lot of it was<BR>
slapped together quickly and then not really reviewed or tested much,<BR>
and doesn't get much use either.<BR>
 <BR>
I constantly see incorrect on-demand initialization as well. This code had it as well.<BR>
<BR> - Jay<BR><BR> <BR>> Date: Mon, 19 Apr 2010 16:15:06 +0200<BR>> From: wagner@elegosoft.com<BR>> To: m3devel@elegosoft.com<BR>> Subject: Re: [M3devel] giant lock in SocketWin32.m3?<BR>> <BR>> Quoting Jay K <jay.krell@cornell.edu>:<BR>> <BR>> ><BR>> > Anyone know why SocketWin32.m3 has had a giant lock around everything?<BR>> ><BR>> > I see no point to it.<BR>> ><BR>> > The only global variable is related to on-demand initialization.<BR>> ><BR>> > And even that wasn't handled correctly..<BR>> <BR>> Perhaps the network stack on Windows95/98 wasn't really reentrant?<BR>> <BR>> Just a guess though. The code is quite old as far as I know.<BR>> <BR>> Olaf<BR>> -- <BR>> Olaf Wagner -- elego Software Solutions GmbH<BR>> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<BR>> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95<BR>> http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin<BR>> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<BR>> <BR>                                        </body>
</html>