I have put aside some time to do some parallel I/O experiments with threads today and TBB. My thought is that since TBB maps tasks to threads: if I know that I have N worker threads if I was to do say a parallel_for to read a file in N chunks, that each operator() will get mapped to a real thread, which should then block and voila I have parallel I/O in some sense.
My questions are:
1) Does this make sense to do?
2) How do I determine N ? I know that TBB purposely does not provide the number of worker threads to discourage thread-based programming... but surely there must be some variable somewhere in TBB or a private function that could be used to determine the number of worker threads.