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