Esempio n. 1
0
Simulation::~Simulation() {
	printf("Deleting simulation...\n");
	//enqueue a task which will stop the background thread.
	enqueueTask([]() {throw ThreadTerminationException();});
	backgroundTaskThread.join();
	delete planner;
	printf("Simulation deleted.\n");
}
Esempio n. 2
0
Simulation::~Simulation() {
	//enqueue a task which will stop the background thread.
	enqueueTask([]() {throw ThreadTerminationException();});
	backgroundTaskThread.join();
	delete planner;
}