I have a simple problem that I need to solve, and I'd like an advice about it. The problem is quite simple, actually, but being a TBB newbie, nothing can be set aside.
With a file containing strings, I need each string to be transformed. I also need to create the output file of transformed strings, regardless of the order of strings. It's a classical producer-consumer problem.
My initial thought is this: is it possible using TBB to create a sort of "pipeline" in which I read the file and each thread (in a thread pool), if available, takes ownership of the string, process it, and write to the output file.
I've read the parallel_pipeline documentation, but it's not what I need, as far as I understand. I'd need some "parallel consumer queue" concept, but I didn't see it at first sight. There is a thread (from 2007) in the forum with a link, but the link it provided is no longer active.
Thanks for any hint you can possibly give me!