druntime thread (from foreach parallel?) cleanup bug
Steven Schveighoffer
schveiguy at gmail.com
Tue Nov 1 19:56:40 UTC 2022
On Tuesday, 1 November 2022 at 18:18:45 UTC, Steven Schveighoffer
wrote:
>
> Oh yeah, isDaemon detaches the thread from the GC. Don't do
> that unless you know what you are doing.
As discussed on discord, this isn't actually true. All it does is
prevent the thread from being joined before exiting the runtime.
What is *likely* happening is, the runtime shuts down. That
thread is still running, but the D runtime is gone. So it
eventually starts trying to do something (like let's say, access
thread local storage), and it's gone. Hence the segfault.
-Steve
More information about the Digitalmars-d-learn
mailing list