[Issue 12812] Need a way to detach a thread externally when its address is unknown

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 27 11:00:05 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12812

Sean Kelly <sean at invisibleduck.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #1 from Sean Kelly <sean at invisibleduck.org> ---
There are a few ways of going about this, but I'm going with a new call:

extern (C) void thread_detachInstance(Thread t)

The user can iterate through the active thread list and detach all threads that
are not equivalent to Thread.getThis, or according to whatever other rule is
appropriate.  Perhaps checking the isDaemon flag, since all attached threads
are daemons.

--


More information about the Digitalmars-d-bugs mailing list