Small tests i share because why not
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

18 行
292 B

#include <thread>
#include <iostream>
volatile int counter=0;
void incr(const int count=200000)
{
for(int i=0;i<count;i++)
counter++;
}
int main()
{
std::thread m(incr,200000);
incr(200000);
std::cout << "Expects 400000, get "<< counter <<std::endl;
return 0;
}