比这篇新的文章:
Codee#997
比这篇旧的文章: Simple New Line Converter - CRLN DOS<=>UNIX,换行符替换工
作者: , 点击153次, 评论(0), 收藏者(0), , 打分:
所有评论,共0条:( 我也来说两句)
比这篇旧的文章: Simple New Line Converter - CRLN DOS<=>UNIX,换行符替换工
Codee#996 编辑代码
语言: C++, 标签: 无 2009/05/10发布 10个月前更新 | 编辑代码作者: , 点击153次, 评论(0), 收藏者(0), , 打分:
C++语言: Codee#996
01 #ifndef COMMUNITCATE_H
02 #define COMMUNITCATE_H
03
04 #include "pthread.h"
05
06 class Thread
07 {
08 protected:
09 pthread_t _tid;
10 static void* run0(void* opt);
11 void* run1();//如果类中有保存线程状态的变量,可以在这个函数中可以进行更改操作
12 public:
13 Thread();
14 ~Thread();
15 /**
16 * 创建线程,线程函数是 run0
17 *
18 * @return 成功返回 ture 否则返回 false
19 */
20 bool start();
21 /**
22 * join this thread
23 *
24 */
25 void join();
26 virtual void run(){
27
28 }
29 };
30
31 #endif
02 #define COMMUNITCATE_H
03
04 #include "pthread.h"
05
06 class Thread
07 {
08 protected:
09 pthread_t _tid;
10 static void* run0(void* opt);
11 void* run1();//如果类中有保存线程状态的变量,可以在这个函数中可以进行更改操作
12 public:
13 Thread();
14 ~Thread();
15 /**
16 * 创建线程,线程函数是 run0
17 *
18 * @return 成功返回 ture 否则返回 false
19 */
20 bool start();
21 /**
22 * join this thread
23 *
24 */
25 void join();
26 virtual void run(){
27
28 }
29 };
30
31 #endif
所有评论,共0条:( 我也来说两句)
代码
