Community
cancel
Showing results for 
Search instead for 
Did you mean: 
hedgehogest
Beginner
43 Views

task_scheduler_init creation and release

Hi, guys,

The description of TBB task_scheduler_init is

Detailed Description

Class representing reference to tbb scheduler.

A thread must construct a task_scheduler_init, and keep it alive, during the time that it uses the services of class task.


I am not sure the meaning of the word A thread . Does this mean main thread or the the thread where new task is created.

Could I only create task_scheduler_init only once. Or every thread when new task is going to be created?

Thanks.


0 Kudos
3 Replies
RafSchietekat
Black Belt
43 Views

"Using task_scheduler_init is optional [since] Intel TBB 2.2."
hedgehogest
Beginner
43 Views

Thanks. Since I am using 3.0, so there is no need to use task_scheduler_init when creating task ,and no performance impact, right?
RafSchietekat
Black Belt
43 Views

Normally you needn't worry about it, and rarely will it be what you'll look at to improve performance.
Reply