[Issue 4344] Sockets with multiple threads report missing/failed WSAStartup
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 10 21:17:13 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4344
godmyoh <menodinulla at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |menodinulla at gmail.com
--- Comment #1 from godmyoh <menodinulla at gmail.com> 2010-07-10 21:17:09 PDT ---
I also encountered same problem on Winsows XP.
Sample:
----------------------------------------------------
import core.thread;
import std.socket;
void main()
{
auto thread = new Thread({});
thread.start();
thread.join();
auto socket = new TcpSocket;
}
----------------------------------------------------
Results:
----------------------------------------------------
std.socket.SocketException: Unable to create socket
----------------------------------------------------
And I found following code in /trunk/phobos/std/socket.d.
193 static ~this()
194 {
195 version(Win32)
196 {
197 WSACleanup();
198 }
199 }
200
I think that "shared static ~this()" is correct.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list