build mingwpy with "posix" thread model?

56 views
Skip to first unread message

Cosimo Lupo

unread,
May 3, 2016, 5:30:51 AM5/3/16
to min...@googlegroups.com
Hello,

I need to cythonize a C++ library which uses C++11 threading (std::thread, std::async, etc.).
I can compile the DLL using the mingw-w64 gcc configured for "posix" thread model (as available from MSYS2). However, if I try to use mingwpy, it fails because the latter is compiled with "win32" thread and as such has no C++11 threading support.

Sorry if my question sounds naive questions. Could you please remind me why mingwpy is compiled with "win32" threads instead of "posix" by default? And what are the problems if I use the posix version of mingw gcc to compile my extension modules and supporting libraries?

Thank you,
--

Cosimo Lupo

Cosimo Lupo

unread,
May 3, 2016, 5:52:26 AM5/3/16
to min...@googlegroups.com
I also found this https://github.com/meganz/mingw-std-threads
It's an implementation of the C++11 threading for MinGW GCC built with "win32" (not "posix") threads.
(though it doesn't seem to support std::async)
--

Cosimo Lupo
Software Development

Dalton Maag Ltd
9th Floor, Blue Star House,
234-240 Stockwell Road
London SW9 9SP United Kingdom
Direct: +44 7825 324360
London Office: +44 20 7924 0633

Passionate about type?
Try before you buy - download our free trial fonts
Sign up to our newsletter
Follow us on Twitter


Registered office:
Mutfords, Hare Street,
Buntingford, SG9 0ED, UK
Registered in England and Wales: 3103619

Privacy and Confidentiality Notice:

This is strictly confidential and intended solely for the person or organisation to whom it is addressed. It may contain privileged and confidential information and if you are not an intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this message in error, please notify us as soon as possible and delete it from your system.

carlkl

unread,
May 3, 2016, 4:49:55 PM5/3/16
to mingwpy
There is alo an even more ambitious project: mcfgthread, but right now also without C++0x thread interfaces. Hopefully at some point it is possible to overcome the conceptional thread implementation schism.

Right now I don't intend to change mingwpy to the so-called posix threads model, as it slows down windows threads handling. This may change in future, but needs more time for testing and benchmarking numpy/scipy and others.

Cheers

Carl
Reply all
Reply to author
Forward
0 new messages