📄 threadattr.cpp
字号:
////////////////////////////////////////////////////////////////////////// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -