From eb8663d6c297e0ee237d6576d570a5439743ec9f Mon Sep 17 00:00:00 2001 From: Laky64 Date: Tue, 16 Apr 2024 16:05:44 +0200 Subject: [PATCH] Fixed Segfault --- ntgcalls/utils/binding_utils.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ntgcalls/utils/binding_utils.hpp b/ntgcalls/utils/binding_utils.hpp index 2a075f0e..828c36d9 100644 --- a/ntgcalls/utils/binding_utils.hpp +++ b/ntgcalls/utils/binding_utils.hpp @@ -67,9 +67,7 @@ py::object executor; loop = py::module::import("asyncio").attr("get_event_loop")();\ executor = py::module::import("concurrent.futures").attr("ThreadPoolExecutor")(std::min(static_cast(32), std::thread::hardware_concurrency())); -#define DESTROY_ASYNC \ -loop = py::none();\ -executor = py::none(); +#define DESTROY_ASYNC #define SMART_ASYNC(...) \ return loop.attr("run_in_executor")(executor, py::cpp_function([__VA_ARGS__](){\