201 void join() {pthread_join(thread, 0);}
226 bool is_caller() {
return pthread_equal(thread, pthread_self());}
351 class =
typename std::enable_if<!std::is_convertible<typename std::remove_reference<F>::type,
353 static std::unique_ptr<Cgu::Thread::Thread>
start(F&& func,
355 return start(Cgu::Callback::lambda<>(std::forward<F>(func)), joinable);
358 #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT
453 std::unique_ptr<Cgu::Thread::Thread> thread;
603 JoinableHandle(std::unique_ptr<Cgu::Thread::Thread> thr,
Action act): action(act), detached(false), thread(std::move(thr)) {}
723 static int block(
int& old_state) {
return pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_state);}
751 static int unblock(
int& old_state) {
return pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_state);}
777 int restore(
int& old_state) {
return pthread_setcancelstate(starting_state, &old_state);}