From cbd3d1f000ac6cfb622f2d185d2ca325ae4f007d Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 16 Apr 2024 15:24:53 +0200 Subject: [PATCH] Add comment to create uv xserver --- src/xserver_zmq.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xserver_zmq.cpp b/src/xserver_zmq.cpp index 4895be6..4f23865 100644 --- a/src/xserver_zmq.cpp +++ b/src/xserver_zmq.cpp @@ -120,6 +120,9 @@ namespace xeus return std::make_unique(std::move(impl)); } + // Since xkernel only accepts three arguments, it is recommended to create a lambda function which + // captures a loop pointer and a hook object pointer. For example: + // auto make_xserver = [&loop_ptr, &hook_ptr](context, config, eh){ return make_xserver_uv_shell_main(...); } std::unique_ptr make_xserver_uv_shell_main(xcontext& context, const xconfiguration& config, nl::json::error_handler_t eh,