So I have been using boost as a solution for threading. I seem to be having an issue where the threads I create dont let the main thread that was executing them continue. Eg:
int main(){
while(1){
speech listen; //create speech object
boost::thread speech_thd(boost::bind(&speech::Run,&listen));
speech_thd.join();
std::cout<<"test\n";
//Some sleep call here
}
「テスト」呼び出しは、speech_thd が実行を終了した後にのみ出力されます。メイン while(1) でも実行できるようにするにはどうすればよいですか? これができれば、明らかにスレッドの作成を while(1) の外に移動します:P 助けてくれてありがとう!