[Issue 4951] New: InternetAddress fails to resolve host when multithreading.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 27 20:31:44 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4951

           Summary: InternetAddress fails to resolve host when
                    multithreading.
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: jcao219 at gmail.com


--- Comment #0 from jcao219 at gmail.com 2010-09-27 20:30:58 PDT ---
When multiple instances of std.socket's InternetAddress are created,
"std.socket.AddressException: Unable to resolve host 'www.google.com'"
On Linux, it works.
If you take out the threading, this works fine.

import core.thread;
import std.socket;
import std.stdio;

void test() {
  auto a = new InternetAddress("www.google.com", 80);
  a = new InternetAddress("www.google.com", 80);
  writeln("Connected successfuly.");
}

void main() {
  auto thr = new Thread(&test);
  thr.start();
}

Build 9/27/2010 on both Windows XP and 7.

-- 
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