void SC_LanguageClient::shutdownRuntime()
{
	cleanup_OSC();
#if __APPLE__
	gResyncThread.detach(); // leak!
#endif
}
 average(){
     sum = 0;
     delete_thread_run = true;
 	life = chrono::seconds(10);
     del = thread(&average::deleteOldData, this);
     if(del.joinable()) del.detach();
 }
Пример #3
0
	void StopReceivingMessages()
	{
		if (SetEvent(stopRunning)) {
			messageThread.join();
		} else {
			cerr << "SetEvent failed: " << GetLastError() << "\n";
			messageThread.detach();
		}
	}
Пример #4
0
		void init(void)
		{
			if (currentStage != Stage::NOT_INITIALIZED)
				throw ShmemAlreadyInitializedException();

			shmemBuffer = new char[SHMEM_BUF_SIZE];
			strncpy(shmemBuffer, "INIT", SHMEM_BUF_SIZE);
			agentThread = thread(agent);
			agentThread.detach();
			while (!isMsgEqualTo("ACK"));

			currentStage = Stage::ACTIVE;
		}
Пример #5
0
	void startSim(int* common,int hold1,int hold2,int playerNum,SimType type)
	{
		stopAndGetRes();
		while(running.load())
		{
			this_thread::sleep_for(std::chrono::milliseconds(2));
		}
		std::lock_guard<std::mutex> lck (mtx);
		sum=win=0;
		stop=false;
		simThread=move(thread(work,this,common,(int)type,hold1,hold2,playerNum));
		simThread.detach();
	}
Пример #6
0
 void operator()(thread& t)
 {
   t.detach();
 }
	void detach() {
		_thread.detach();
	}