Skip to content

Commit

Permalink
Add comment to create uv xserver
Browse files Browse the repository at this point in the history
  • Loading branch information
IsabelParedes committed Apr 16, 2024
1 parent 26a2c89 commit 041aecb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/xserver_zmq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ namespace xeus
return std::make_unique<xserver_zmq>(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<xserver> make_xserver_uv_shell_main(xcontext& context,
const xconfiguration& config,
nl::json::error_handler_t eh,
Expand Down

0 comments on commit 041aecb

Please sign in to comment.