diff --git a/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h b/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h index 90139a6a99cfea..ab73c6c8e23d17 100644 --- a/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h +++ b/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h @@ -39,9 +39,9 @@ using RuntimeExecutor = inline static void executeAsynchronously( RuntimeExecutor const &runtimeExecutor, std::function &&callback) noexcept { - std::thread{[callback = std::move(callback), runtimeExecutor]() mutable { + std::thread([callback = std::move(callback), runtimeExecutor]() mutable { runtimeExecutor(std::move(callback)); - }}; + }).detach(); } /*