We use windows threads in addition to TBB in a way that some of our windows threads declare task_scheduler_init object and use parallel_for. Does it mean that we have some task_scheduler_init objects running at the same time, each one of them may have different num_of_threads parameter or are they all using the same scheduler with the same num_of_threads parameter?
Each master thread (a thread that starts a TBB parallel algorithm or uses tasks directly) has to have a task_scheduler_init object created in it. But task_scheduler_init objects are simply proxies to one TBB worker thread pool object (which is a singleton in the process address space) and the number of threads in the pool remain the same until the pool is destroyed. And calling parallel algorithms from either one of the master threads submits tasks to the same set of worker threads.