1 Star 0 Fork 5

ecampuscn/call_demo_server

forked from 张远浩/call_demo_server 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Condition.h 827 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhangyuanhao 提交于 2015-08-15 22:38 . [MOD] 修改实现
/*================================================================
* Copyright (c) 2015年 lanhu. All rights reserved.
*
* 文件名称:Condition.h
* 创 建 者:Zhang Yuanhao
* 邮 箱:bluefoxah@gmail.com
* 创建日期:2015年01月14日
* 描 述:
*
#pragma once
================================================================*/
#ifndef __CONDITION_H__
#define __CONDITION_H__
#include <pthread.h>
#include "Lock.h"
class CCondition
{
public:
CCondition(CLock* pLock);
~CCondition();
void wait();
/*
* nWaitTime ms
* if recv a signal then return true;
* else return false;
*/
bool waitTime(uint64_t nWaitTime);
void notify();
void notifyAll();
private:
CLock* m_pLock;
pthread_cond_t m_cond;
};
#endif /*defined(__CONDITION_H__) */
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ecampuscn/call_demo_server.git
git@gitee.com:ecampuscn/call_demo_server.git
ecampuscn
call_demo_server
call_demo_server
master

搜索帮助