www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 1085] New: Need to add ability to detach threads.

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

           Summary: Need to add ability to detach threads.
           Product: DGCC aka GDC
           Version: 0.23
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: mattbd walkingdog.net


It is not always reasonable to use wait() to clean up thread resources. I would
like to see a detach method for threads or a DetachedThread class added to the
library.


-- 
Mar 28 2007
parent reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1085






For what it's worth, Tango will implicitly detach any thread for which
pthread_join has not been called by the time the the Thread object is
destroyed.  I think this is the preferred approach for D, since some required
functionality of the Thread object may not work if the thread has been detached
prematurely.


-- 
Mar 28 2007
parent Brad Roberts <braddr puremagic.com> writes:
This doesn't seem dgcc/gdc specific and assuming not should be re-assigned 
to the more general D / Phobos bucket.
Mar 28 2007