Condy v1.1.0
C++ Asynchronous System Call Layer for Linux
Loading...
Searching...
No Matches
awaiter_operations.hpp File Reference

Helper functions for composing asynchronous operations. More...

#include "condy/awaiters.hpp"
#include "condy/concepts.hpp"

Go to the source code of this file.

Namespaces

namespace  condy
 The main namespace for the Condy library.
namespace  condy::operators
 Operators for composing awaiters.

Functions

template<typename Func, typename... Args>
auto condy::make_op_awaiter (Func &&func, Args &&...args)
 This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
template<typename MultiShotFunc, typename Func, typename... Args>
auto condy::make_multishot_op_awaiter (MultiShotFunc &&multishot_func, Func &&func, Args &&...args)
 This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
template<BufferRingLike Br, typename Func, typename... Args>
auto condy::make_select_buffer_op_awaiter (Br *buffers, Func &&func, Args &&...args)
 This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
template<typename MultiShotFunc, BufferRingLike Br, typename Func, typename... Args>
auto condy::make_multishot_select_buffer_op_awaiter (MultiShotFunc &&multishot_func, Br *buffers, Func &&func, Args &&...args)
 This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
template<BufferRingLike Br, typename Func, typename... Args>
auto condy::make_bundle_select_buffer_op_awaiter (Br *buffers, Func &&func, Args &&...args)
 This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
template<typename MultiShotFunc, BufferRingLike Br, typename Func, typename... Args>
auto condy::make_multishot_bundle_select_buffer_op_awaiter (MultiShotFunc &&multishot_func, Br *buffers, Func &&func, Args &&...args)
 This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
template<typename FreeFunc, typename Func, typename... Args>
auto condy::make_zero_copy_op_awaiter (FreeFunc &&free_func, Func &&func, Args &&...args)
 This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
template<unsigned int Flags, AwaiterLike Awaiter>
auto condy::flag (Awaiter &&awaiter)
 Decorates an awaiter with specific io_uring sqe flags.
template<AwaiterLike Awaiter>
auto condy::drain (Awaiter &&awaiter)
 Mark an awaiter as drain operation.
template<AwaiterLike Awaiter>
auto condy::always_async (Awaiter &&awaiter)
 Mark an awaiter to always execute asynchronously.
template<template< AwaiterLike... Awaiter > typename AwaiterType, AwaiterLike... Awaiter>
auto condy::parallel (Awaiter &&...awaiters)
 Compose multiple awaiters into a single awaiter that executes them in parallel.
template<template< typename Awaiter > typename RangedAwaiterType, AwaiterRange Range>
auto condy::parallel (Range &&range)
 Compose multiple awaiters from a range into a single awaiter that executes them in parallel.
template<AwaiterLike... Awaiters>
auto condy::when_all (Awaiters &&...awaiters)
 Compose multiple awaiters into a single awaiter that completes when all of them complete.
template<AwaiterRange Range>
auto condy::when_all (Range &&range)
 Compose multiple awaiters from a range into a single awaiter that completes when all of them complete.
template<AwaiterLike... Awaiters>
auto condy::when_any (Awaiters &&...awaiters)
 Compose multiple awaiters into a single awaiter that completes when any of them complete.
template<AwaiterRange Range>
auto condy::when_any (Range &&range)
 Compose multiple awaiters from a range into a single awaiter that completes when any of them complete.
template<AwaiterLike... Awaiters>
auto condy::link (Awaiters &&...awaiters)
 Compose multiple awaiters into a single awaiter that executes them in sequence.
template<AwaiterRange Range>
auto condy::link (Range &&range)
 Compose multiple awaiters from a range into a single awaiter that executes them in sequence.
template<AwaiterLike... Awaiters>
auto condy::hard_link (Awaiters &&...awaiters)
 Compose multiple awaiters into a single awaiter that executes them in sequence and continues even if one of them fails.
template<AwaiterRange Range>
auto condy::hard_link (Range &&range)
 Compose multiple awaiters from a range into a single awaiter that executes them in sequence and continues even if one of them fails.
template<AwaiterLike Awaiter1, AwaiterLike Awaiter2>
auto condy::operators::operator&& (Awaiter1 aw1, Awaiter2 aw2)
 Operator overloads version of when_all.
template<AwaiterLike Awaiter, AwaiterLike... Awaiters>
auto condy::operators::operator&& (WhenAllAwaiter< Awaiters... > aws, Awaiter aw)
 Operator overloads version of when_all.
template<AwaiterLike Awaiter1, AwaiterLike Awaiter2>
auto condy::operators::operator|| (Awaiter1 aw1, Awaiter2 aw2)
 Operator overloads version of when_any.
template<AwaiterLike Awaiter, AwaiterLike... Awaiters>
auto condy::operators::operator|| (WhenAnyAwaiter< Awaiters... > aws, Awaiter aw)
 Operator overloads version of when_any.
template<AwaiterLike Awaiter1, AwaiterLike Awaiter2>
auto condy::operators::operator>> (Awaiter1 aw1, Awaiter2 aw2)
 Operator overloads version of link.
template<AwaiterLike Awaiter, AwaiterLike... Awaiters>
auto condy::operators::operator>> (LinkAwaiter< Awaiters... > aws, Awaiter aw)
 Operator overloads version of link.

Detailed Description

Helper functions for composing asynchronous operations.

This file provides a set of interfaces for constructing asynchronous operations. It includes utilities for wrapping liburing interfaces as awaitable asynchronous operations, as well as for composing and combining these operations to enable collective execution.