Background thread, async and GUI (dlangui)

Bagomot bagomot at gmail.com
Thu Jul 21 13:27:49 UTC 2022


I had this question: how can I get the value from the `task`, 
like how I can get from the `spawnLinked`(`ownerTid.send` and 
`receive`)?

I'm using a `taskPool` through `arr.parallel`, but it became 
necessary to collect the progress from all tasks into one 
variable.

In this case, I can't use `spawnLinked` because the worker is 
mutable, I get the "Aliases to mutable thread-local data not 
allowed" error.

Also, I could make a new `Thread` for each task, but I think this 
is a bad idea. Also, I don't know how to send messages from child 
thread to parent thread.


More information about the Digitalmars-d-learn mailing list