문제

I am looking for an example of how to use the Threaded Building Blocks task_arena class with enqueue and wait_until_empty.

Here is the process I am following. As described in the documentation above, add these includes:

#define TBB_PREVIEW_TASK_ARENA 1
#include "tbb/task.h"
#include “tbb/task_arena.h”

Then, create the tasks with tbb::task::allocate_root and enqueue them using tbb::arena::enqueue.

However, I receive this error on the arena wait_until_empty() method:

error: ‘class tbb::interface7::task_arena’ has no member named ‘wait_until_empty’

I am using the most current release version 4.3, update 3.

Please provide a simple working example.

도움이 되었습니까?

해결책

The method wait_until_empty was removed from class task_arena in recent updates. Unfortunately, the documentation at software.intel.com which you refer to is not updated yet. I recommend to use the documentation at threadingbuildingblocks.org which is more up to date.

The example in that documentation page demonstrates how you can combine task_arena and task_group to achieve functionality similar to wait_until_empty.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top