Ai
1 Star 0 Fork 0

wangcichen/urbackup_backend

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
SelectThread.h 753 Bytes
Copy Edit Raw Blame History
Martin Raiber authored 2011-07-05 20:03 +08:00 . Fixed syntax error
#ifndef SELECTTHREAD_H
#define SELECTTHREAD_H
#include "Interface/Thread.h"
#include "Interface/Mutex.h"
#include "Interface/Condition.h"
#include <deque>
#include <vector>
#include "types.h"
class CClient;
class CWorkerThread;
const size_t max_clients=60;
class CSelectThread : public IThread
{
public:
CSelectThread(_u32 pWorkerThreadsPerMaster);
~CSelectThread();
void operator()();
bool AddClient(CClient *client);
bool RemoveClient(CClient *client);
size_t FreeClients(void);
void WakeUp(void);
private:
void FindWorker(CClient *client);
std::deque<CClient*> clients;
IMutex *mutex;
ICondition* cond;
IMutex *stop_mutex;
ICondition *stop_cond;
bool run;
};
#endif //SELECTTHREAD_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/wangcichen/urbackup_backend.git
git@gitee.com:wangcichen/urbackup_backend.git
wangcichen
urbackup_backend
urbackup_backend
dev

Search