remove msleep, clean PIConditionVariable, rewrite pipipelinethread, etc...

This commit is contained in:
Andrey
2021-10-29 16:52:03 +03:00
parent 21e03fc8cb
commit 6e5a5a6ade
16 changed files with 203 additions and 213 deletions

View File

@@ -131,11 +131,15 @@ public:
//! @brief Set necessity of lock every \a run with internal mutex
void needLockRun(bool need) {lockRun = need;}
EVENT_HANDLER0(void, lock) {mutex_.lock();}
EVENT_HANDLER0(void, unlock) {mutex_.unlock();}
//! @brief Lock internal mutex
EVENT_HANDLER0(void, lock) const {thread_mutex.lock();}
//! @brief Unlock internal mutex
EVENT_HANDLER0(void, unlock) const {thread_mutex.unlock();}
//! @brief Returns internal mutex
PIMutex & mutex() {return mutex_;}
PIMutex & mutex() const {return thread_mutex;}
//! @brief Returns thread ID
llong tid() const {return tid_;}
@@ -239,7 +243,7 @@ protected:
int delay_, policy_;
llong tid_;
void * data_;
mutable PIMutex mutex_;
mutable PIMutex thread_mutex;
PITimeMeasurer tmf_, tms_, tmr_;
PIThread::Priority priority_;
ThreadFunc ret_func;