Skip to content

[DependencyScan] Use llvm::DefaultThreadPool instead of llvm::StdThreadPool #79341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kateinoigakukun
Copy link
Member

llvm::StdThreadPool is only available when LLVM_ENABLE_THREADS is enabled. LLVM defines DefaultThreadPool type alias, which is always available regardless of the threads enabled. This change allows building the library without threads enabled, especially for Emscripten toolchain.

#if LLVM_ENABLE_THREADS
using DefaultThreadPool = StdThreadPool;
#else
using DefaultThreadPool = SingleThreadExecutor;
#endif

…hreadPool`

`llvm::StdThreadPool` is only available when LLVM_ENABLE_THREADS is enabled.
LLVM defines `DefaultThreadPool` type alias, which is always available
regardless of the threads enabled. This change allows building the library
without threads enabled, especially for Emscripten toolchain.

  ```
  #if LLVM_ENABLE_THREADS
  using DefaultThreadPool = StdThreadPool;
  #else
  using DefaultThreadPool = SingleThreadExecutor;
  #endif
  ```
@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun kateinoigakukun merged commit 6542647 into swiftlang:main Feb 13, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants