As this is my first message here, let me start by praising TBB and saying how much I'm happy to have found this package! It has made life a lot easier for me already and I've just only scratched the surface.
I am working on an application that is a bit peculiar in that it does both want to have a fluid user interface and do a lot of background processing. It is a photo viewer/organiser which you can take a look at at http://www.gpuviewer.com, should you wish to know more.
Here is my problem:
- on the front, the app is displaying photos (which requires intensive computations for decompression of JPG/RAW)
- in the background, the app needs to walk your hard drive and do various tasks.
The background work is ideally suited to TBB, splitting work in small tasks is easy and organising them in "for" loops, pipelines and the like won't be a problem.
Now, what (I think) I need to do, when the UI needs a photo decompressed, is to pause the current flow of tasks, run the background decompression job as a task and then resume what was previously going on.
My guess is that I might be able to do this at the TBB scheduler level, somewhere in the logic where a thread decides where to go next when it is done with a task.
Ok, so here are my questions:
- has anybody faced a similar case before?
- does what I write above make any sense ?
- does anybody have any suggestion ?
Thanks in advance