std.concurrency is a low-level API. You may be looking for a higher level API: std.parallelism. See Task.done(), https://dlang.org/phobos/std_parallelism.html#.Task.doneBastiaan.
Thanks for the answer. I will look at the possibilities of std.parallelism.