Re: How to send ownerTid into a parallel foreach loop?

2020-06-27 Thread Kagamin via Digitalmars-d-learn
On Saturday, 27 June 2020 at 07:51:21 UTC, adnan338 wrote: On Saturday, 27 June 2020 at 07:31:56 UTC, Kagamin wrote: std.concurrency is for noninteractive appications, the approach with gui timer was the correct one. Thank you. That works but my progress bar is sometimes getting stuck because

Re: How to send ownerTid into a parallel foreach loop?

2020-06-27 Thread adnan338 via Digitalmars-d-learn
On Saturday, 27 June 2020 at 07:31:56 UTC, Kagamin wrote: std.concurrency is for noninteractive appications, the approach with gui timer was the correct one. Thank you. That works but my progress bar is sometimes getting stuck because of a possible data race. See https://forum.dlang.org/post/

Re: How to send ownerTid into a parallel foreach loop?

2020-06-27 Thread Kagamin via Digitalmars-d-learn
std.concurrency is for noninteractive appications, the approach with gui timer was the correct one.

How to send ownerTid into a parallel foreach loop?

2020-06-26 Thread adnan338 via Digitalmars-d-learn
I have a list of files to download, and I want to download them in parallel. At the end of each of those parallel download I want to send the main thread a message from the parallel loop. import std.concurrency, std.parallelism; string[] files = ["a", "b", "c"]; void download(string[] links)