remove msleep, clean PIConditionVariable, rewrite pipipelinethread, etc...
This commit is contained in:
@@ -145,9 +145,9 @@ bool PISystemMonitor::startOnSelf(int interval_ms) {
|
||||
|
||||
|
||||
PIVector<PISystemMonitor::ThreadStats> PISystemMonitor::threadsStatistic() const {
|
||||
mutex_.lock();
|
||||
lock();
|
||||
PIVector<PISystemMonitor::ThreadStats> ret = cur_ts;
|
||||
mutex_.unlock();
|
||||
unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -341,9 +341,9 @@ void PISystemMonitor::run() {
|
||||
//piCout << ts_new.cpu_load_user;
|
||||
}
|
||||
last_tm = cur_tm;
|
||||
mutex_.lock();
|
||||
lock();
|
||||
cur_ts = cur_tm.values();
|
||||
mutex_.unlock();
|
||||
unlock();
|
||||
tstat.ram_total = totalRAM();
|
||||
tstat.ram_used = usedRAM();
|
||||
tstat.ram_free = freeRAM();
|
||||
|
||||
Reference in New Issue
Block a user