Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

std::thread on iOS

Do all implementations of std::thread for iOS internally include <pthread.h>?

I know that some while ago, this only worked with g++ and -lpthread, but many upgrades have arrived since then.

like image 342
Alex Cohn Avatar asked Apr 28 '26 12:04

Alex Cohn


1 Answers

The answer is positive. At least in Version 7.2 (7C68) of Xcode, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread has unconditional

#include <pthread.h>
like image 93
Alex Cohn Avatar answered May 01 '26 03:05

Alex Cohn