mirror of
https://github.com/znc/znc.git
synced 2026-05-01 02:52:30 +02:00
Threads: Add some undefined constructors etc
This is needed to "get rid" of the C++ default implementation. Yes, I know that this can be done way nicer with C++11... Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
@@ -71,6 +71,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
// Undefined copy constructor and assignment operator
|
||||
CMutex(const CMutex&);
|
||||
CMutex& operator=(const CMutex&);
|
||||
|
||||
pthread_mutex_t m_mutex;
|
||||
};
|
||||
|
||||
@@ -105,6 +109,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
// Undefined copy constructor and assignment operator
|
||||
CMutexLocker(const CMutexLocker&);
|
||||
CMutexLocker& operator=(const CMutexLocker&);
|
||||
|
||||
CMutex &m_mutex;
|
||||
bool m_locked;
|
||||
};
|
||||
@@ -161,6 +169,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
// Undefined copy constructor and assignment operator
|
||||
CConditionVariable(const CConditionVariable&);
|
||||
CConditionVariable& operator=(const CConditionVariable&);
|
||||
|
||||
pthread_cond_t m_cond;
|
||||
};
|
||||
|
||||
@@ -185,6 +197,10 @@ public:
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
// Undefined constructor
|
||||
CThread();
|
||||
};
|
||||
|
||||
class CJob {
|
||||
@@ -192,6 +208,11 @@ public:
|
||||
virtual ~CJob() {}
|
||||
virtual void runThread() = 0;
|
||||
virtual void runMain() = 0;
|
||||
|
||||
private:
|
||||
// Undefined copy constructor and assignment operator
|
||||
CJob(const CJob&);
|
||||
CJob& operator=(const CJob&);
|
||||
};
|
||||
|
||||
class CThreadPool {
|
||||
|
||||
Reference in New Issue
Block a user