mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Removed usage of boost::thread from vcmi, except for AI
This commit is contained in:
@ -252,9 +252,10 @@ int CConsoleHandler::run()
|
||||
cb(buffer, false);
|
||||
}
|
||||
else
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(100));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
|
||||
boost::this_thread::interruption_point();
|
||||
if (shutdownPending)
|
||||
return -1;
|
||||
#else
|
||||
std::getline(std::cin, buffer);
|
||||
if ( cb )
|
||||
@ -306,7 +307,7 @@ void CConsoleHandler::end()
|
||||
if (thread.joinable())
|
||||
{
|
||||
#ifndef VCMI_WINDOWS
|
||||
thread.interrupt();
|
||||
shutdownPending = true;
|
||||
#else
|
||||
TerminateThread(thread.native_handle(),0);
|
||||
#endif
|
||||
@ -316,7 +317,7 @@ void CConsoleHandler::end()
|
||||
|
||||
void CConsoleHandler::start()
|
||||
{
|
||||
thread = boost::thread(std::bind(&CConsoleHandler::run, this));
|
||||
thread = std::thread(std::bind(&CConsoleHandler::run,console));
|
||||
}
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user