Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用 Cocos2d-x 编写一个带有 AI 的中国象棋游戏。当我触摸板时,我想启动一个运行 AI 的线程,并且我需要知道该线程何时结束。如何向主线程发送消息?
cocos2d-x 框架默认不是多线程的。如果你想使用自己的,你需要自己学习如何使用 pthread 创建、加入和检测互斥锁等。