I’m actually very happy with my solution, but of course it would be nice to have another option available.
Kevin, yes there is lots of info on pthread on the web, but an astonishing lack of information on how to use it with this framework, and absolutely nothing stating definitively that it will work cross-platform (beyond ios and android).
Since it is a part of the framework, a simple example in the test project would be much appreciated.
I can only see two files that use pthread in the entire cocos2d-x directory: CCTextureCache.cpp and HttpClient.cpp. I did not find them helpful in getting this to work.
Doing something as simple as including “pthread/pthread.h” in my header will fail to compile with the error:
“c:2d-2.0-x-2.0.2\cocos2dx\platform\third_party\win32\pthread\pthread.h(288): fatal error C1083: Cannot open include file: ‘sched.h’: No such file or directory”.
If you or anyone else has a simple working example of using pthreads in cocos2d-2.0-x-2.0.2 or later, can you please share your code and state what, if any extra steps are required to get it to work.