In g++ is C++ 11 thread model using pthreads in the background?

Viewed 9213

I am just trying my hands on g++ 4.6 and C++11 features. Every time I compile a simple threading code using -std=c++0x flag, either it crashes with segmentation fault or it just throws some weird exception.

I read some questions related to C++11 threads and I realized that, I also need to use -pthread flag to compile the code properly. Using -pthread worked fine and I was able to run the threaded code.

My question is, whether the C++11 multi-threading model uses Pthreads in the background? Or is it written from the scratch?

I don't know if any of the members are gcc contributors but I am just curious.

3 Answers
Related