On 06.08.22 19:40, Bruno Haible wrote:
Tim Rühsen wrote:
I read that even the MS C compilers / libraries support ISO C thread
nowadays,

I can't confirm this. If it were true, they would have documentation for it.
But a web search for "mtx_lock site:microsoft.com" returns no meaningul
results.

You are right. After diving deeper into it, I'd say I was blinded by some overly-
enthusiastic comments on social media.


Testing with wine, as I don't own a Windows license.
Have to carry a USB stick to a friend in order to test on real Windows
(trying to avoid that).

Yes, working like this is tedious.

'--enable-threads=windows' does not work with MinGW since 'threads.h' is
not available via gnulib then.

?? What do you mean? You have imported the 'threads' module, and it provides
a <threads.h> file.

When I create a testdir for the 'threads' module and build it on mingw,
all tests pass, except for a hanging 'test-nanosleep'.

Maybe you are lacking a -I directive to the build directory where threads.h
has been generated?

Sorry, when using the shortcut of `autoconf -fi` after adding gl_AVOID_WINPTHREAD, lib/threads.h was gone.
A './boostrap' fixed it.

I will test '--enable-threads=windows' on real Windows in the next days, but TBH, it feels like the C11 threads experiment failed :-|

Maybe there is a (effective) way to rewrite the inter-thread communication avoiding cond_timedwait.

Regards, Tim


Bruno



Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to