# Migrating from Threading Building Blocks (TBB)

While oneTBB is mostly source compatible with TBB, some interfaces were deprecated in TBB and redesigned or removed in oneTBB. This section considers the most difficult use cases for migrating TBB to oneTBB.

- Migrating from tbb::task_scheduler_init
  - Managing the number of threads
    - Querying the default number of threads
    - Setting the maximum concurrency
    - Examples
  - Setting thread stack size
  - Terminating oneTBB scheduler
- Migrating from low-level task API
  - Spawning of individual tasks
    - Using `oneapi::tbb::task_group`
    - Using `oneapi::tbb::parallel_invoke`
  - Adding more work during task execution
  - Task recycling
    - Recycling as child or continuation
  - Scheduler Bypass
  - Deferred task creation
- Mixing two runtimes