Intel® Threading Building Blocks

Extending task class in tbb

I am trying to extend the task class and override the "spawn_and_wait_for_all" class function. Like this.


namespace tbb {

     class my_task: public task {


               void spawn_and_wait_for_all ( task& child ) { }



If the define the "spawn_and_wait_for_all" in the class itself (like above) I am able to call that function. But when I put the function definition in a separate cpp file I get an "undefined reference error". Like this


namespace tbb {

Allow for C++11 move semantics in TBB mutex and lock types

Please make tbb::queuing_mutex and tbb::queuing_rw_mutex non-movable in C++11 and later to meet C++11 requirements for STL mutexes (§30.4.1). Mutex implementations outside the STL are not required to meet the requirements for the STL, but this is probably what the developers would expect.

In addition, if possible, please also implement move constructors and move assignment operators for the respective scoped_lock inner classes. The std::lock_guard and std::unique_lock classes have this functionality. If this is not possible, please delete these methods.


Proposed patch 4.3 for simplifying compilation errors for tbb::atomic

Dear TBB Developers,

Please consider the attached patch for tbb43_20141009oss_src which simplifies the compilation errors for misusing tbb::atomic.

Basically, tbb users sometimes misuse tbb::atomic with unsupported types, for example.
And the compiler-error message about the misuse is not easy to understand since it exposes internal details about tbb.

A TBB example does not compile in VS 2013

Hello All,

I was able to build and run shortpath example using the nmake and the Makefile to build the example. In the command line window (in Spanish is: Simbolo del sistema, I think Prompt window in English) I ran tbbvars.bat and I fixed PATH and INCLUDE environment variables:

set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\bin;%PATH%

set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\include;%INCLUDE%

Then I executed nmake and the executable was built and I ran it.

tbbmalloc operator new should check new_handler's before throwing std::bad_alloc

I have an installed new_handler using std::set_new_handler(new_handler), which I would like to be called when tbbmalloc runs out of memory on a call to new or new[]. The current implementation in src/tbbmalloc/proxy.cpp just returns std::bad_alloc if scalable_malloc returns NULL, rather than getting the new_handler if one exists and calling it.

This is an enhancement request for a future version of tbbmalloc.

Body classes of unlimited function nodes

For a long time my understanding of the prominent warning that the function node body will be copied was that there had to be at least as many instances of the body class as there are of concurrent threads executing that particular body. But that understanding was incorrect. Nothing seems to be preventing multiple threads from accessing the same instance of the body class, so there is an implicit (at least, I haven't seen it stated anywhere) assumption that the operator() associated with the body is reentrant. First of all, can somebody confirm this?


Hello. I have been starded work with Intel TBB. Is it possible to set affinity in Intel TBB? I want to run one thread on one core. I write sample test code, but it's dont work correcly.

Subscribe to Intel® Threading Building Blocks