prgbenz
prgbenz

Reputation: 1189

is tbb::thread still in TBB-4.x?

I have just read the document of the latest TBB's documents. I can't find any information about tbb::thread, but I saw some information about mutex.

BTW, if TBB-4.x have thread library please help me find the resources of using tbb threads. Please don't recommend the official documents, they are lack of examples.

thanks!

Upvotes: 1

Views: 342

Answers (1)

Anton
Anton

Reputation: 6537

There was no tbb::thread but there was a tbb::tbb_thread, now deprecated. You can find it here. Doc says:

Intel® Threading Building Blocks (Intel® TBB) 3.0 introduces a header tbb/compat/thread that defines class std::thread. Prior versions had a header tbb/tbb_thread.h that defined class tbb_thread. The old header and names are still available, but deprecated in favor of the replacements...

TBB provides tbb/compat/ features for sake of compilers which lack C++11 support. The thread class was designed to be as close to std::thread or rather to boost::thread (at the time of introduction) as possible, thus you can refer to examples provided for these two if TBB documentation is not satisfactory.

You can also try tbb\examples\task_priority\fractal example which demonstrates usage of the thread class.

Upvotes: 3

Related Questions