#SuspendThread SuspendThread v0.1.0
纯娱乐
std::thread在构造时自行启动。
可能很难使用 std::thead 然后使用底层线程(如 Windows 线程或 Pthread)。
但是使用 SuspendThread 线程有助于控制你的线程
##如何使用
# include
# include " SuspendThread.hpp "
int main ()
{
SuspendThread t ([](){ std::cout << " Oh I'm suspended! " << std::endl;});
// make thread suspended state
t. run ();
// now it run
SuspendThread t1 ([]( int a){std::co
2021-06-03 13:04:23
13.7MB
C++
1