Skip to content

Replace pthreads in multithreaded sample with standard C++11 <thread> #13732

Open
@Subham-KRLX

Description

@Subham-KRLX

Problem

In PR #13702 it was decided to retain build.cmd for Windows, since that's not actually the root issue. The real limitation is the use of pthreads in the multithreaded sample, which restricts cross-platform compatibility.

Proposal

  • Update the multithreaded example to use C++11 <thread> instead of pthreads
  • Remove direct pthread dependencies in the sample code
  • Adjust build scripts or CMake/Makefiles to avoid needing -pthread
  • Ensure the sample builds and runs consistently on Windows, macOS, and Linux without extra libraries or flags

Benefits

  • Enables true cross-platform support out of the box
  • Simplifies build system and reduces dependency overhead
  • Demonstrates modern C++ best practices in the sample

References:

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions