What OTL high level abstraction is best suited for parallel picture loading?

131 views Asked by At

I would like to expose you my problem here. I'm trying to build a user interface in one of my application where the user can see multiple pictures (TImage objects) on the same form.

These pictures should be loaded from potentially large image files on the HDD. Obviously, sequentially loading all these TImages in the main thread takes time. It also freeze the main thread and thus avoid the user to interact with the software in the mean-time.

That's why i'm trying to load all these images in parallel tasks thanks to OTL while my user can still interact.

But i'm not sure which abstraction is best suited for it and how i'm supposed to use it. I'm aware of the issues related to accessing GUI components from other threads. From what i've read in documentations "ForEach" seams to be appropriate for my use case, although i'm not sure.

What are your thoughts on this use case?

Sorry for asking such a vague question here.

0

There are 0 answers