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

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from [email protected] ---
I think that the issue is that the thread is never joined properly.

I have an application that listens to a socket and spawns a new thread for each
(very short-lived) incoming connection, and I have to run `joinLowLevelThread`
to get a proper cleanup. And for that each running thread has to send back its
id to its parent using `Thread.getThis.id`.

Also, thread_joinAll doesn't work in my case either because it waits for all
the threads... in order. And I happen to have some other long lived threads, so
it blocks there and never cleans up anything.

Part of the issue is that you can't get the underlying Thread object from
`spawn`, so there's no way to join it. The other part, of course, is that this
is not taken care of automatically.

Incidentally, it also leaks memory like hell, I can see the GC usage
continuously growing and no amount of GC.collect or GC.minimize can get rid of
it, so the data must be being kept somewhere...

--

Reply via email to