thread.h

来自「用你的语音Modem实现像电话一样通话的程序」· C头文件 代码 · 共 28 行

H
28
字号
#ifndef THREAD_H#define THREAD_H#include <pthread.h>class Thread{private:	static void* entrypoint(void *parameters);protected:	virtual void run() = 0;public:	Thread(int synchronous = 0, int realtime = 0);	virtual ~Thread();	void start();	end(pthread_t tid);           // end another thread	end();    // end this thread	join();   // join this thread	suspend_thread();   // suspend this thread	continue_thread();     // continue this thread	exit_thread();   // exit this thread	int synchronous;         // set to 1 to force join() to end	int realtime;            // set to 1 to schedule realtime  	pthread_t tid;};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?