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

📄 vpthread.cpp

📁 otl简单包装实现类,对数据库进行操作的,简单易用.
💻 CPP
字号:
/***************************************************************************                          vpthread.cpp -  description                             -------------------    begin                : 11.26 15:18:00 CST 2003    copyright            : (C) 2003 by |LiuZhong|    email                : |zliu@foundermn.com| ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/ #include "vpthread.h"VPThread::VPThread(){	m_bRunning = false;	m_Pid = 0;}VPThread::~VPThread(){	if(m_bRunning){     	Terminate();	}	}void* VPThread::RunThread(void* pArg){//	Detach();	((VPThread*)pArg)->Run();	return NULL;}void VPThread::Run(){}void VPThread::Detach(){	pthread_detach(m_Pid);}void VPThread::Join(){	pthread_join(m_Pid,NULL);}void VPThread::Start(){	m_bRunning = true;	pthread_create(&m_Pid,NULL,RunThread,this);	}void VPThread::Terminate(){	m_bRunning = false;}bool VPThread::IsTerminated(){	return !m_bRunning;}

⌨️ 快捷键说明

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