git-svn-id: svn://db.shs.com.ru/pip@756 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -82,12 +82,12 @@ public:
|
||||
|
||||
EVENT_HANDLER0(bool, start) {return start(-1);}
|
||||
EVENT_HANDLER1(bool, start, int, timer_delay);
|
||||
bool start(ThreadFunc func) {ret_func = func; return start(-1);}
|
||||
bool start(ThreadFunc func) {return start(func, -1);}
|
||||
bool start(ThreadFunc func, int timer_delay) {ret_func = func; return start(timer_delay);}
|
||||
EVENT_HANDLER0(bool, startOnce);
|
||||
EVENT_HANDLER1(bool, startOnce, ThreadFunc, func) {ret_func = func; return startOnce();}
|
||||
EVENT_HANDLER0(void, stop) {stop(false);}
|
||||
EVENT_HANDLER1(void, stop, bool, wait) {terminating = true; if (wait) waitForFinish();}
|
||||
EVENT_HANDLER1(void, stop, bool, wait);
|
||||
EVENT_HANDLER0(void, terminate);
|
||||
|
||||
//! \brief Set common data passed to external function
|
||||
@@ -126,8 +126,8 @@ public:
|
||||
//! \brief Returns thread ID
|
||||
llong tid() const {return tid_;}
|
||||
|
||||
static void __thread_func__(void*);
|
||||
static void __thread_func_once__(void*);
|
||||
void __thread_func__();
|
||||
void __thread_func_once__();
|
||||
|
||||
EVENT(started)
|
||||
EVENT(stopped)
|
||||
@@ -221,6 +221,10 @@ protected:
|
||||
PIThread::Priority priority_;
|
||||
ThreadFunc ret_func;
|
||||
PRIVATE_DECLARATION
|
||||
|
||||
private:
|
||||
NO_COPY_CLASS(PIThread)
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user