Re: Multitasking question: Making a picture viewer, loading lots of images in the background

2019-04-03 Thread Aldo via Digitalmars-d-learn
On Wednesday, 3 April 2019 at 02:59:51 UTC, realhet wrote: Hi, I'm writing a picture browser program and I'd like to ask for a bit of assistance. [...] Hello, maybe the following links can be useful: http://ddili.org/ders/d.en/parallelism.html http://ddili.org/ders/d.en/fibers.html

Re: Multitasking question: Making a picture viewer, loading lots of images in the background

2019-04-03 Thread realhet via Digitalmars-d-learn
On Wednesday, 3 April 2019 at 04:09:45 UTC, DanielG wrote: My understanding is that there's no benefit to creating more than the number of hyperthreads your CPU Yes. I'm just searching for a higher abstraction to manage this easily in D. I've already did it years ago on Delphi. (-> Manage N

Re: Multitasking question: Making a picture viewer, loading lots of images in the background

2019-04-02 Thread DanielG via Digitalmars-d-learn
I'm no threading expert but 1000 - if those indeed are real threads (like, preemptive OS threads) - is wa too many. My understanding is that there's no benefit to creating more than the number of hyperthreads your CPU supports (minus your main thread?). So you'd want a work queue of all

Multitasking question: Making a picture viewer, loading lots of images in the background

2019-04-02 Thread realhet via Digitalmars-d-learn
Hi, I'm writing a picture browser program and I'd like to ask for a bit of assistance. My app is basically a Win32 window with an OpenGL surface. Currently I'm able to display a lot of pictures in it. The decompression of the bitmaps take place at the beginning of the program. I want to