www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4975] New: Threads + TcpSockets + Windows = FAIL (also, core.thread is broken on Linux)

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4975

           Summary: Threads + TcpSockets + Windows = FAIL (also,
                    core.thread is broken on Linux)
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: b599400 lhsdv.com



Created an attachment (id=779)
An example program.

If you create a thread from core.thread and a listening socket in the same
program, then once the thread exits, all attempts to accept() from the
listening socket will fail with the error message "Unable to accept socket
connection", and so will all attempts to create new TcpSockets.

An example program is provided. I believe it to be the simplest program that
exhibits this bug.

When compiled with -version=Works, then the created threads never exit, so the
failure condition is never reached.

When compiled with -version=Broken, the threads exit immediately, leading to
failure as soon as you connect to localhost:1234.

This bug is only present in the Windows version of DMD. When compiled on Linux,
the example program works properly with both version tags. (Mac OS X was not
tested).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 02 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4975


Rainer Schuetze <r.sagitario gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario gmx.de



PDT ---
I guess this is related to bug 4344.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 03 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4975


Stephan Dilly <spam extrawurst.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |spam extrawurst.org
         Resolution|                            |DUPLICATE



---
*** This issue has been marked as a duplicate of issue 4344 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 30 2010