Skip to content

Is it safe to link oneTBB statically if I only use concurrent containers? #1877

@Wizmann

Description

@Wizmann

Hi oneTBB team,

I know that static linking of oneTBB is generally discouraged because of duplicated schedulers and global state issues.

In my case, I only use concurrent data structures such as:

  • concurrent_queue
  • concurrent_vector
  • concurrent_hash_map
  • ...

I don’t use any task scheduling APIs (parallel_for, task_arena, etc.).

So I’d like to ask:

  1. Is it safe to build and link oneTBB as a static library in this limited use case?
  2. Do these concurrent containers internally depend on the global scheduler or other runtime components that make static linking unsafe?

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions