Concurrency::parallel_for,牛逼了,它是不会动态调配线程的

GKatHere GKatHere 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

// vs 2017
Concurrency::parallel_for(0, 10,// cpu核数4
[](int nt) {
switch (nt)
{
case 0:
case 1:
case 2:
printf("nt: %d, \n", nt);
do
{
Sleep(1);
} while (1);
break;
default:
printf("nt: %d, \n", nt);

}});

...全文

相关推荐

评论
收藏 已收藏
分享
返回顶部
GKatHere
C++ 语言 65,214 成员 250,514 内容