Is there anyway to use std::thread
with C++11 standard library in windows when compiling with g++ 4.5.2 in MinGW?
I\'m going assume no as I\'ve seen man
There is already a lightweight native implementation of std::thread and sync primitives: https://github.com/meganz/mingw-std-threads
IT is a header-only library and should work with any C++11 compliant version of MinGW. You just need to include the headers in your code.
There is experimental support for std::thread
in for MinGW-w64 toolchains.
Specifically, my GCC 4.6 builds provide usable std::thread
through MinGW-w64's winpthreads library.
You can find downloads here:
Apart from that, MSVC11 (Visual Studio 2012) has <thread>
, <chrono>
, and <atomic>
. You can download the Express edition here.