mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 13:51:34 +01:00
resolved warnings, also from esrf: todo: include changes in zmq
This commit is contained in:
@@ -24,8 +24,8 @@ public:
|
||||
~func00_t() {}
|
||||
void operator()() const {((m_ptr->*m_fn)());}
|
||||
private:
|
||||
_Class* m_ptr;
|
||||
_Ret (_Class::*m_fn)();
|
||||
_Class* m_ptr;
|
||||
};
|
||||
|
||||
template<typename _Ret, typename _Class, typename _Store>
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
~func0_t() {}
|
||||
void operator()() const {*m_store = ((m_ptr->*m_fn)());}
|
||||
private:
|
||||
_Class* m_ptr;
|
||||
_Ret (_Class::*m_fn)();
|
||||
_Class* m_ptr;
|
||||
_Store* m_store;
|
||||
};
|
||||
|
||||
@@ -49,8 +49,8 @@ public:
|
||||
~func1_t() {}
|
||||
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1));}
|
||||
private:
|
||||
_Class* m_ptr;
|
||||
_Ret (_Class::*m_fn)(_Arg1);
|
||||
_Class* m_ptr;
|
||||
_Arg1 m_arg1;
|
||||
_Store* m_store;
|
||||
};
|
||||
@@ -63,8 +63,8 @@ public:
|
||||
~func2_t() {}
|
||||
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2));}
|
||||
private:
|
||||
_Class* m_ptr;
|
||||
_Ret (_Class::*m_fn)(_Arg1,_Arg2);
|
||||
_Class* m_ptr;
|
||||
_Arg1 m_arg1;
|
||||
_Arg2 m_arg2;
|
||||
_Store* m_store;
|
||||
@@ -78,8 +78,8 @@ public:
|
||||
~func3_t() {}
|
||||
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2,m_arg3));}
|
||||
private:
|
||||
_Class* m_ptr;
|
||||
_Ret (_Class::*m_fn)(_Arg1,_Arg2,_Arg3);
|
||||
_Class* m_ptr;
|
||||
_Arg1 m_arg1;
|
||||
_Arg2 m_arg2;
|
||||
_Arg3 m_arg3;
|
||||
@@ -94,8 +94,8 @@ public:
|
||||
~func4_t() {}
|
||||
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2,m_arg3,m_arg4));}
|
||||
private:
|
||||
_Class* m_ptr;
|
||||
_Ret (_Class::*m_fn)(_Arg1,_Arg2,_Arg3,_Arg4);
|
||||
_Class* m_ptr;
|
||||
_Arg1 m_arg1;
|
||||
_Arg2 m_arg2;
|
||||
_Arg3 m_arg3;
|
||||
|
||||
@@ -67,12 +67,13 @@ int ThreadPool::destroy_threadpool(){
|
||||
/*cout << "Broadcasting STOP signal to all threads..." << endl;*/
|
||||
m_task_cond_var.broadcast(); // notify all threads we are shttung down
|
||||
|
||||
int ret = -1;
|
||||
// int ret = -1;
|
||||
for (int i = 0; i < m_pool_size; i++) {
|
||||
void* result;
|
||||
sem_post(&semStart);
|
||||
sem_post(&semDone);
|
||||
ret = pthread_join(m_threads[i], &result);
|
||||
//ret =
|
||||
pthread_join(m_threads[i], &result);
|
||||
/*cout << "pthread_join() returned " << ret << ": " << strerror(errno) << endl;*/
|
||||
m_task_cond_var.broadcast(); // try waking up a bunch of threads that are still waiting
|
||||
}
|
||||
@@ -85,7 +86,8 @@ int ThreadPool::destroy_threadpool(){
|
||||
}
|
||||
|
||||
void* ThreadPool::execute_thread(){
|
||||
int ithread = current_thread_number;
|
||||
//for debugging seting ithread value
|
||||
// int ithread = current_thread_number;
|
||||
thread_started = true;
|
||||
Task* task = NULL;
|
||||
m_tasks_loaded = false;
|
||||
|
||||
Reference in New Issue
Block a user