Skip to content

Commit

Permalink
Fixed Segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
Laky-64 committed Apr 16, 2024
1 parent e1ccefb commit eb8663d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ntgcalls/utils/binding_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t>(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__](){\
Expand Down

0 comments on commit eb8663d

Please sign in to comment.