thread detach 완성
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
namespace Chattr {
|
||||
Thread::~Thread() {
|
||||
join();
|
||||
if (!detached)
|
||||
join();
|
||||
}
|
||||
|
||||
void Thread::join() {
|
||||
@@ -12,4 +13,11 @@ void Thread::join() {
|
||||
pthread_join(handle_, NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void Thread::deatch() {
|
||||
detached = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user