ΒΆvoid llvm_execute_on_thread_async(
llvm::unique_function<void()> Func,
llvm::Optional<unsigned int>
StackSizeInBytes = llvm::None)
void llvm_execute_on_thread_async(
llvm::unique_function<void()> Func,
llvm::Optional<unsigned int>
StackSizeInBytes = llvm::None)
Description
Schedule the given \p Func for execution on a separate thread, then return to the caller immediately. Roughly equivalent to `std::thread(Func).detach()`, except it allows requesting a specific stack size, if supported for the platform. This function would report a fatal error if it can't execute the code on a separate thread.
Declared at: llvm/include/llvm/Support/Threading.h:82
Parameters
- llvm::unique_function<void()> Func
- - The callback to execute.
- llvm::Optional<unsigned int> StackSizeInBytes = llvm::None
- - A requested size (in bytes) for the thread stack (or None for default)