[Mlir-commits] [mlir] a8b0ae3 - [mlir] Do not start threads in AsyncRuntime
Eugene Zhulenev
llvmlistbot at llvm.org
Thu Oct 22 08:31:37 PDT 2020
Author: Eugene Zhulenev
Date: 2020-10-22T08:31:30-07:00
New Revision: a8b0ae3bddee311cbc97801089a95702f32773f8
URL: https://github.com/llvm/llvm-project/commit/a8b0ae3bddee311cbc97801089a95702f32773f8
DIFF: https://github.com/llvm/llvm-project/commit/a8b0ae3bddee311cbc97801089a95702f32773f8.diff
LOG: [mlir] Do not start threads in AsyncRuntime
pthreads is not enabled for all builds by default
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D89967
Added:
Modified:
mlir/lib/ExecutionEngine/AsyncRuntime.cpp
Removed:
################################################################################
diff --git a/mlir/lib/ExecutionEngine/AsyncRuntime.cpp b/mlir/lib/ExecutionEngine/AsyncRuntime.cpp
index 650fb392ff32..b450a8334ae4 100644
--- a/mlir/lib/ExecutionEngine/AsyncRuntime.cpp
+++ b/mlir/lib/ExecutionEngine/AsyncRuntime.cpp
@@ -59,8 +59,7 @@ mlirAsyncRuntimeAwaitToken(AsyncToken *token) {
extern "C" MLIR_ASYNCRUNTIME_EXPORT void
mlirAsyncRuntimeExecute(CoroHandle handle, CoroResume resume) {
- std::thread thread([handle, resume]() { (*resume)(handle); });
- thread.detach();
+ (*resume)(handle);
}
extern "C" MLIR_ASYNCRUNTIME_EXPORT void
More information about the Mlir-commits
mailing list