⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thread.h

📁 This is pthread c++ wrapper class. Developer can easily develop multithread programs with GNU C++ ju
💻 H
字号:
#ifndef _THREAD_H_#define _THREAD_H_#include <pthread.h>class Thread{public:    Thread(int id = 0);    virtual ~Thread();

    virtual void start();    virtual void stop();    virtual void join();    bool         isRunning();    virtual void run() = 0;private:    //private copy-ctor; prevent copied    Thread(const Thread&);    //private assignment operator; prevent copied    Thread& operator=(const Thread&);    friend void *_threadFunc(void *);protected:    bool              m_running;private:    pthread_t         m_thread;    pthread_attr_t    m_attr;
    int               m_threadid;};#endif // _THREAD_H_

⌨️ 快捷键说明

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