[all-commits] [llvm/llvm-project] 727e1c: Support: add llvm::thread class that supports spec...

Tim Northover via All-commits all-commits at lists.llvm.org
Thu Jul 8 06:52:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 727e1c9be3a5b20c6b502f056d74a681689049d7
      https://github.com/llvm/llvm-project/commit/727e1c9be3a5b20c6b502f056d74a681689049d7
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2021-07-08 (Thu, 08 Jul 2021)

  Changed paths:
    M clang-tools-extra/clangd/support/Threading.cpp
    M clang/tools/libclang/CIndex.cpp
    M llvm/include/llvm/Support/CrashRecoveryContext.h
    M llvm/include/llvm/Support/Threading.h
    M llvm/include/llvm/Support/thread.h
    M llvm/lib/Support/CrashRecoveryContext.cpp
    M llvm/lib/Support/ThreadPool.cpp
    M llvm/lib/Support/Threading.cpp
    M llvm/lib/Support/Unix/Threading.inc
    M llvm/lib/Support/Windows/Threading.inc
    M llvm/unittests/Support/Threading.cpp

  Log Message:
  -----------
  Support: add llvm::thread class that supports specifying stack size.

This adds a new llvm::thread class with the same interface as std::thread
except there is an extra constructor that allows us to set the new thread's
stack size. On Darwin even the default size is boosted to 8MB to match the main
thread.

It also switches all users of the older C-style `llvm_execute_on_thread` API
family over to `llvm::thread` followed by either a `detach` or `join` call and
removes the old API.




More information about the All-commits mailing list