I have an idea that I'd like to implement, but I don't know where to start.
The class I intend to write is a disk intensive task one, so I'd like to have its users submit data to be written to disk, and return immediately before the actual disk operation. I believe this could be done with this:
- concurrent_queue will be used to submit data to be written, the function will enqueue and exit immediately
- parallel_do or similar construct that monitors the queue and does the hard work
- the infinite loop should, I believe, run a separate thread
I don't think what I've written corresponds to the best implementation, or it suits TBB the best.
Do you have any suggestions?