diff --git a/mlir/lib/ExecutionEngine/AsyncRuntime.cpp b/mlir/lib/ExecutionEngine/AsyncRuntime.cpp --- a/mlir/lib/ExecutionEngine/AsyncRuntime.cpp +++ b/mlir/lib/ExecutionEngine/AsyncRuntime.cpp @@ -59,8 +59,7 @@ 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