parallelism

Nicholas Wilson iamthewilsonator at hotmail.com
Sat Jan 27 10:38:25 UTC 2018


On Saturday, 27 January 2018 at 10:28:10 UTC, Arun Chandrasekaran 
wrote:
> ```
>     import std.parallelism;
>     auto pool = new TaskPool(options.threadCount);
>     foreach (_; 0 .. options.iterationCount) {
>         switch (options.operation) {
>             static foreach(e; EnumMembers!Operation) {
>                 case e:
>                      pool.put(task!e(options));
>                      break;
>     }
>     pool.finish();
> ```

Does that do the trick?




More information about the Digitalmars-d-learn mailing list