Is that somewhat similar to D's std.parallelism module? A simple example of its use here:
https://jugad2.blogspot.com/2016/12/simple-parallel-processi...