Beispiel #1
0
int main()
{
	//Just use the stack here why not
	MyThread Thread;
	
	Thread.Launch();
	
	for (int i = 0; i < 10; ++i)
	{
		std::cout << "MAIN THREAD" << std::endl;
		sf::Sleep(1.5f);
		//Proof that threads don't block
	}
	
	Thread.Terminate();
	//Properly terminate thread
	
	return EXIT_SUCCESS;
	//Thread is deleted after going out of scope
}