[Mingw-users] Support for std::thread in libstdc++

Back to archive index
Keith Marshall keith****@users*****
Wed Mar 13 07:06:06 JST 2019


On 12/03/19 15:41, Eli Zaretskii wrote:
> Does anyone know what happens if a program is compiled that uses this
> class?  Will it fail to compile, or abort at run time, or something
> else?

I reviewed some of our historical archives, (my own local copies); it
appears that, if GCC has been built with the win32 thread model, the
class definition isn't exposed, so you get a compile time failure,
diagnosed as "thread is not a member of std", or some such.

> I'm told that that Jonathan Wakely once wrote a port for Win32 API,
> but couldn't find anyone to help him test it.  Maybe there's a way to
> find the patches and incorporate them into the MinGW GCC build?

Once again, in my local archive[1], I found several messages from K.
Frank, referring to an implementation which he had developed, (but never
showing any actual code); Jonathan Wakely persistently declined to
accept it, as a win32 implementation, because, as described, it either
required a GCC built for the POSIX threads model, (and hence requiring
linking with pthreads-win32, or winpthreads, or similar), or it used
(and depended upon) WinAPI features which are unsupported prior to Vista
(hence no more XP and earlier support), and which are also incompatible
with the existing GCC win32 gthreads mutex implementation, which he
(Jonathan) was not prepared to change.

[1] I found an equivalent public copy****@SF*****:
https://sourceforge.net/p/mingw/mailman/mingw-users/thread/CAH6eHdT88TfHCTYd8uhqhRQgrFTQRxvNEPnRXdwzEzukirrqrg%40mail.gmail.com/#msg29242115

-- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://lists.osdn.me/mailman/archives/mingw-users/attachments/20190312/19643422/attachment.sig>


More information about the MinGW-Users mailing list
Back to archive index