parameters: (self, max_num_threads=None, benchmark=False)
docstring: Create context manager for running under TBB scheduler.
          :param max_num_threads: if specified, limits maximal number of threads
          :param benchmark: if specified, blocks in initialization until requested number of threads are ready
docstring_summary: Create context manager for running under TBB scheduler.
          :param max_num_threads: if specified, limits maximal number of threads
          :param benchmark: if specified, blocks in initialization until requested number of threads are ready
docstring_tokens: Create context manager for running under TBB scheduler . : param max_num_threads : if specified limits maximal number of threads : param benchmark : if specified blocks in initialization until requested number of threads are ready
function: def __init__(self, max_num_threads=None, benchmark=False):
          """
          Create context manager for running under TBB scheduler.
          :param max_num_threads: if specified, limits maximal number of threads
          :param benchmark: if specified, blocks in initialization until requested number of threads are ready
          """
          if max_num_threads:
              self.ctl = global_control(global_control.max_allowed_parallelism, int(max_num_threads))
          if benchmark:
              if not max_num_threads:
                 max_num_threads = default_num_threads()
              from .api import _concurrency_barrier
              _concurrency_barrier(int(max_num_threads))
function_tokens: def __init__ ( self , max_num_threads = None , benchmark = False ) : if max_num_threads : self . ctl = global_control ( global_control . max_allowed_parallelism , int ( max_num_threads ) ) if benchmark : if not max_num_threads : max_num_threads = default_num_threads ( ) from . api import _concurrency_barrier _concurrency_barrier ( int ( max_num_threads ) )