thread detach 완성

This commit is contained in:
2025-04-24 21:36:48 +09:00
parent 07cff49813
commit c660c41657
6 changed files with 26 additions and 2 deletions

View File

@@ -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;
}
}