198 void join() {pthread_join(thread, 0);}
223 bool is_caller() {
return pthread_equal(thread, pthread_self());}
348 class =
typename std::enable_if<!std::is_convertible<typename std::remove_reference<F>::type,
350 static std::unique_ptr<Cgu::Thread::Thread>
start(F&& func,
352 return start(Cgu::Callback::lambda<>(std::forward<F>(func)), joinable);
355 #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT
450 std::unique_ptr<Cgu::Thread::Thread> thread;
600 JoinableHandle(std::unique_ptr<Cgu::Thread::Thread> thr,
Action act): action(act), detached(false), thread(std::move(thr)) {}
720 static int block(
int& old_state) {
return pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_state);}
748 static int unblock(
int& old_state) {
return pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_state);}
774 int restore(
int& old_state) {
return pthread_setcancelstate(starting_state, &old_state);}