Re: How to create Multi Producer-Single Consumer concurrency

2022-07-13 Thread Bagomot via Digitalmars-d-learn
On Wednesday, 13 July 2022 at 19:06:48 UTC, Ali Çehreli wrote: On 7/13/22 02:25, Bagomot wrote: > How to do the same with `taskPool` instead of `spawnLinked`? You are hitting the nail on the head. :) std.parallelism, which taskPool is a concept of, is for cases where operations are independen

Re: How to create Multi Producer-Single Consumer concurrency

2022-07-13 Thread Ali Çehreli via Digitalmars-d-learn
On 7/13/22 02:25, Bagomot wrote: > How to do the same with `taskPool` instead of `spawnLinked`? You are hitting the nail on the head. :) std.parallelism, which taskPool is a concept of, is for cases where operations are independent. However, producer and consumer are by definition dependent,

Re: How to create Multi Producer-Single Consumer concurrency

2022-07-13 Thread Bagomot via Digitalmars-d-learn
On Tuesday, 16 June 2020 at 09:10:09 UTC, Ali Çehreli wrote: On 6/12/20 3:02 PM, adnan338 wrote: > So there are multiple "download finished" message producers, and one > consumer of those messages. Furthermore, that producer has a callback > that triggers an UI object. That's almost exactly wha

Re: How to create Multi Producer-Single Consumer concurrency

2020-06-16 Thread Ali Çehreli via Digitalmars-d-learn
On 6/12/20 3:02 PM, adnan338 wrote: > So there are multiple "download finished" message producers, and one > consumer of those messages. Furthermore, that producer has a callback > that triggers an UI object. That's almost exactly what I do in some of my programs. I use std.concurrency and the