diff --git a/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h b/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h index 90139a6a99..ab73c6c8e2 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(); } /*