1#ifndef LIPH_CONCURRENCY_THREAD_H_
2#define LIPH_CONCURRENCY_THREAD_H_
11inline void sleeps(
int n) { std::this_thread::sleep_for(std::chrono::seconds(n)); }
12inline void sleepms(
int n) { std::this_thread::sleep_for(std::chrono::microseconds(n)); }
32 if (!t.joinable())
throw std::logic_error(
"No thread");
scoped_thread(scoped_thread const &)=delete
scoped_thread & operator=(scoped_thread const &)=delete
scoped_thread(std::thread t_)
Definition: thread.h:31
~scoped_thread()
Definition: thread.h:34
~thread_guard()
Definition: thread.h:17
thread_guard(std::thread &t)
Definition: thread.h:16
thread_guard & operator=(const thread_guard &)=delete
thread_guard(const thread_guard &)=delete
Definition: algorithm.h:10
void sleeps(int n)
Definition: thread.h:11
void sleepms(int n)
Definition: thread.h:12