20 #include <ndb_global.h>
21 #include <NdbThread.h>
27 NDB_THREAD_PRIO m_thread_prio;
30 static void* run_C(
void* t) {
40 NDB_THREAD_PRIO thread_prio= NDB_THREAD_PRIO_LOW) :
43 m_stack_size(stack_size),
44 m_thread_prio(thread_prio),
52 virtual void run()= 0;
55 m_thread = NdbThread_Create(run_C, (
void**)
this, m_stack_size,
56 m_name, m_thread_prio);
57 return (m_thread != NULL);
66 NdbThread_WaitFor(m_thread, &res);
67 NdbThread_Destroy(&m_thread);
71 bool is_stopped() {
return !m_running; };