On 5/27/21 2:58 AM, Christian Köstlin wrote:

>      writeln(taskPool.amap!(user => servers.doSomething(user))(users));

Luckily, parallel() is a free-standing function that does not require a "this context". Is the following a workaround for you?

  auto result = new string[users.length];
users.enumerate.parallel.each!(en => result[en.index] = servers.doSomething(en.value));
  writeln(result);

Ali


Reply via email to