ilya-biryukov added a comment. 1. Can we put the helper that executes the tasks asynchronously with a stack size into llvm's threading library (i.e. somewhere close to `llvm::execute_on_thread`?) All platform-specific code is already there, we can reuse most of the implementation too. 2. I wonder if we should expose the stack size as an option to clangd?
================ Comment at: clangd/Threading.cpp:57 +template <typename Data> +static void executeOnThreadAndDetach(UserFnPtr<Data> UserFn, Data UserData) { +#if !defined(__APPLE__) ---------------- Maybe add a parameter for the stack size to this function? (And document it's only taken into account when pthread-based implementation is used) ================ Comment at: clangd/Threading.cpp:57 +template <typename Data> +static void executeOnThreadAndDetach(UserFnPtr<Data> UserFn, Data UserData) { +#if !defined(__APPLE__) ---------------- ilya-biryukov wrote: > Maybe add a parameter for the stack size to this function? (And document it's > only taken into account when pthread-based implementation is used) Maybe accept a `llvm::unique_function<void()>` instead of `UserFn` and `Data`? This split is clearly implementation detail of pthreads-based solution. `std::thread` does not need it. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50993 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits