Skip to content

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