From a8b0ae3bddee311cbc97801089a95702f32773f8 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Thu, 22 Oct 2020 08:17:53 -0700 Subject: [PATCH] [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 --- mlir/lib/ExecutionEngine/AsyncRuntime.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mlir/lib/ExecutionEngine/AsyncRuntime.cpp b/mlir/lib/ExecutionEngine/AsyncRuntime.cpp index 650fb39..b450a83 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 -- 2.7.4