Community
cancel
Showing results for 
Search instead for 
Did you mean: 
192 Views

Asynchronous IO in TBB

Dear all,

 

I am outputting some computed results per short time period. 

In order to achieve the benefits of concurrency, I am considering to introduce asynchronous IO.

 

Just output of data in memory to files is so simple that I wondering if executing task for outputting is met for my purpose.

On the other hand, I know there is some library for asynchronous IO (boost::asio etc).

Is TBB properly working with such a thread libraries? Or, should I close my methods in TBB?

 

I always thank for helpful comments of experts.

 

Kind regards

 

0 Kudos
1 Reply
Alexei_K_Intel
Employee
192 Views

Dear Mitsuru,

The general recommendation is to avoid IO operations on TBB worker threads (because it might reduce CPU utilization). So you can create a dedicated thread (or threads) and request them to perform IO operations when necessary. To organize communications between threads, you may want to consider tbb::concurrent_bounded_queue or tbb::flow::async_node.

Regards,
Alex

Reply