threadattr.cpp
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C++ 代码 · 共 85 行
CPP
85 行
////////////////////////////////////////////////////////////////////////// ThreadAttr.cpp//// by Reiot, the Fallen Lord of MUDMANIA(TM)//// Last Updated : 1999. 06. 30.//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// include//////////////////////////////////////////////////////////////////////#include "ThreadAttr.h"#include "pthreadAPI.h"using namespace pthreadAPI;////////////////////////////////////////////////////////////////////////// constructor////////////////////////////////////////////////////////////////////////ThreadAttr::ThreadAttr () throw ( Error ){ __BEGIN_TRY pthread_attr_init_ex( &attr ); __END_CATCH}////////////////////////////////////////////////////////////////////////// destructor////////////////////////////////////////////////////////////////////////ThreadAttr::~ThreadAttr () throw ( Error ){ __BEGIN_TRY pthread_attr_destroy_ex( &attr ); __END_CATCH}////////////////////////////////////////////////////////////////////////// 静饭靛狼 DETACHED attribute甫 府畔茄促.////////////////////////////////////////////////////////////////////////int ThreadAttr::getDetachState () const throw ( Error ){ __BEGIN_TRY int state; pthread_attr_getdetachstate_ex( &attr , &state ); return state; __END_CATCH} ////////////////////////////////////////////////////////////////////////// 静饭靛狼 DETACHED attribute甫 汲沥茄促.////////////////////////////////////////////////////////////////////////void ThreadAttr::setDetachState ( int state ) throw ( Error ){ __BEGIN_TRY pthread_attr_setdetachstate_ex( &attr , state ); __END_CATCH}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?