0
点赞
收藏
分享

微信扫一扫

d内外并行

雷亚荣 2022-08-27 阅读 194


​​原文​​

import std;

void doSomething(int i, string s)
{
writeln("%s-%s".format(i, s));
}

void main()
{
foreach (t; cartesianProduct(iota(1, 4), ["abc", "def", "ghi"]).parallel) {
doSomething(t.expand);
}
}


举报

相关推荐

0 条评论