Re: [RFC 0/6] Demangle minimal symbol names in worker threads

Eli Zaretskii
2019-03-12T03:33:49Z

> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
> Date: Mon, 11 Mar 2019 16:39:15 -0600
>
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>
> Eli> Thanks, but is std::thread portable enough? E.g., I recall problems
> Eli> with it in MinGW.
>
> I asked around and learned that std::thread should work fine if you have
> winpthreads, which apparently is used by default for mingw-w64.
>
> I don't actually know much about the mingw world, so I don't know if
> that is good enough or not. Could you say?

I could try. But regardless, I think we should allow for ports whose
std::thread is not up to the task, because evidently this is a
problematic area of libstdc++. It is IMO better to allow running this
code in a single thread than breaking the entire build on some
platform because other platforms might benefit from multiple execution
cores.

> Eli> Same question regarding delivering signals to threads.
>
> If the signal thing is broken in this series, then it is probably
> already broken today. However I think it ought to be ok as SEGV is a
> synchronous signal; that is, it is delivered to the faulting thread.

I thought you were going to use that for signals in general. Maybe
SEGV is OK. But in general, signals are weird on Windows wrt threads;
for example, a SIGINT handler runs in a separate thread created by
Windows.

Thanks.