29 #include <SDL_timer.h> 51 warning(
"Thread::createThread(): Thread \"%s\" already running and trying to rename to \"%s\"",
_name.
c_str(), name.
c_str());
73 _killThread.store(
true, boost::memory_order_seq_cst);
76 for (
int i = 0;
_threadRunning.load(boost::memory_order_seq_cst) && (i < 100); i++)
79 _killThread.store(
false, boost::memory_order_seq_cst);
81 const bool stillRunning =
_threadRunning.load(boost::memory_order_seq_cst);
#define START_IGNORE_IMPLICIT_FALLTHROUGH
A class holding an UTF-8 string.
boost::atomic< bool > _killThread
const char * c_str() const
Return the (utf8 encoded) string data.
bool createThread(const UString &name="")
A class that creates its own thread.
Utility templates and functions.
bool empty() const
Is the string empty?
void warning(const char *s,...)
#define STOP_IGNORE_IMPLICIT_FALLTHROUGH
virtual void threadMethod()=0
static int threadHelper(void *obj)
Compiler-specific defines to mark an implicit switch-case fallthrough.
boost::atomic< bool > _threadRunning