microsoft / microsoft/vscode-cpptools

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

Aperta
#13,732 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@Subham-KRLX ci sta già lavorando.

Dal 27/6/2025.

bug
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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:

  • Initial PR & discussion: #13702

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.