摘要:
先上代码,主要是线程类"CLThread": 头文件: View Code #ifndef CLTHREAD_H#define CLTHREAD_H#include #include "CLExecutive.h"#include "CLStatus.h"#include "CLEv... 阅读全文
posted @ 2011-10-22 21:26
lq0729
阅读(908)
评论(0)
推荐(0)
摘要:
POSIX.1说明:pthread_cond_broadcast等函数的调用无需考虑调用线程是否拥有锁,并建议在在lock和unlock以外的区域调用。为什么? §假设系统中有线程 1和线程 2:线程 1获取 mutex,在进行数据处理的时候,线程 ... 阅读全文
posted @ 2011-10-22 15:19
lq0729
阅读(1254)
评论(0)
推荐(0)
摘要:
View Code #include #include #include "CLThread.h"#include "CLExecutiveFunctionProvider.h"#include "CLMutex.h"#include "CLCriticalSection.h"#in... 阅读全文
posted @ 2011-10-22 12:34
lq0729
阅读(738)
评论(0)
推荐(0)
摘要:
1. 首先pthread_cond_wait 的定义是这样的 The pthread_cond_wait() and pthread_cond_timedwait() functions are used to block on a condition variable. They are ca... 阅读全文
posted @ 2011-10-22 11:48
lq0729
阅读(1603)
评论(0)
推荐(0)