Condy v1.8
C++ Asynchronous System Call Layer for Linux
Loading...
Searching...
No Matches
awaiter_operations.hpp
Go to the documentation of this file.
1
9
10#pragma once
11
12#include "condy/concepts.hpp"
14
15namespace condy {
16
27template <CQEHandlerLike CQEHandler, PrepFuncLike PrepFunc, typename... Args>
28auto build_op_awaiter(PrepFunc &&func, Args &&...handler_args) {
29 return build_op_sender<CQEHandler>(std::forward<PrepFunc>(func),
30 std::forward<Args>(handler_args)...);
31}
32
46template <CQEHandlerLike CQEHandler, PrepFuncLike PrepFunc,
47 typename MultiShotFunc, typename... Args>
48auto build_multishot_op_awaiter(PrepFunc &&func, MultiShotFunc &&multishot_func,
49 Args &&...handler_args) {
50 return build_multishot_op_sender<CQEHandler>(
51 std::forward<PrepFunc>(func),
52 std::forward<MultiShotFunc>(multishot_func),
53 std::forward<Args>(handler_args)...);
54}
55
68template <CQEHandlerLike CQEHandler, PrepFuncLike PrepFunc, typename FreeFunc,
69 typename... Args>
70auto build_zero_copy_op_awaiter(PrepFunc &&func, FreeFunc &&free_func,
71 Args &&...handler_args) {
72 return build_zero_copy_op_sender<CQEHandler>(
73 std::forward<PrepFunc>(func), std::forward<FreeFunc>(free_func),
74 std::forward<Args>(handler_args)...);
75}
76
77} // namespace condy
The main namespace for the Condy library.
Definition condy.hpp:37
auto build_op_awaiter(PrepFunc &&func, Args &&...handler_args)
Build a single-shot operation awaiter with custom CQE handler.
auto build_zero_copy_op_awaiter(PrepFunc &&func, FreeFunc &&free_func, Args &&...handler_args)
Build a zero-copy operation awaiter with custom CQE handler.
auto build_multishot_op_awaiter(PrepFunc &&func, MultiShotFunc &&multishot_func, Args &&...handler_args)
Build a multi-shot operation awaiter with custom CQE handler.
Helper functions for composing asynchronous operations.