boost::capy

Namespaces

Name

Description

test

this_coro

Provide awaitable accessors for the running coroutine's environment.

Types

Name

Description

abandonable

Await an awaitable on behalf of a segment owner.

any_executor

Forwards dispatch/`post`/`context` calls through a shared, type‐erased executor pointer.

any_read_stream

Dispatches read_some through a type‐erased vtable, using preallocated awaitable storage.

any_stream

Dispatches read_some and write_some through independent type‐erased vtables.

any_write_stream

Dispatches write_some through a type‐erased vtable, using preallocated awaitable storage.

async_event

Queues coroutines in wait() and resumes all of them when set() is called.

async_mutex

Queues coroutines in lock() and resumes exactly one when the mutex is free.

async_waker

Hand a wakeup from any thread to one waiting coroutine, latching it if none waits.

await_context

Carries the executor, stop token, and frame allocator through a coroutine chain.

buffers_iterator

Iterate over the bytes of a buffer sequence as one continuous run.

buffers_iterator

Iterate over the bytes of a buffer sequence as one continuous run.

chain_owner

Unwind a coroutine chain's segment when one of its coroutines is abandoned.

const_buffer

Refer to a contiguous region of read‐only memory without owning it.

const_buffer_archetype

Satisfies ConstBufferSequence without being default‐constructible.

context_awaitable_promise_base

Give a promise frame allocation and environment propagation to I/O awaitables.

continuation

Pair a coroutine handle with a scratch slot for allocation‐free queuing.

execution_context

Registers, looks up, and shuts down service objects owned by a derived context.

executor_ref

Forwards dispatch/`post`/`context` calls through a non‐owning, type‐erased executor pointer.

frame_alloc_mixin

Allocate a promise's coroutine frames from the current frame allocator.

immediate

Complete a co_await at once with a stored value.

mutable_buffer

Refer to a contiguous region of writable memory without owning it.

mutable_buffer_archetype

Satisfies MutableBufferSequence without being default‐constructible.

recycling_memory_resource

Recycles freed blocks through per‐thread pools, with a shared pool for cross‐thread reuse.

run_async_wrapper

Installs the frame allocator, then starts the task on the executor when called once.

strand

Provides serialized coroutine execution for any executor type.

task

Defers a coroutine body until awaited, then runs it inline on the caller's thread.

thread_pool

Distributes posted work across a fixed group of worker threads via a shared queue.

work_guard

Hold work on an executor so its execution context does not finish.

Type Aliases

Name

Description

awaitable_result_t

Names the result type of A::await_resume().

buffer_type

Names mutable_buffer for a mutable sequence, const_buffer otherwise.

results

Bundles an error code with optional payload values, exposed via the tuple protocol.

Enums

Name

Description

cond

Group error codes from capy operations into portable conditions.

error

Identify failures reported by capy algorithms and I/O operations.

Functions

Name

Description

abandon

Give up a suspended coroutine for good.

buffer_copy

Copy the contents of a buffer sequence into another buffer sequence.

buffer_sequence_begin

buffer_sequence_begin overloads

buffer_sequence_end

buffer_sequence_end overloads

buffer_size

Return the total byte count across all buffers in a sequence.

buffers_begin

buffers_begin overloads

buffers_count

Return the number of buffer elements in a sequence.

buffers_empty

Check if a buffer sequence contains no data.

buffers_end

buffers_end overloads

buffers_front

buffers_front overloads

get_current_frame_allocator

Return the current frame allocator for this thread.

get_recycling_memory_resource

Return a pointer to the process‐wide recycling memory resource.

get_system_context

Return a process‐wide thread pool, creating it on first use.

make_buffer

make_buffer overloads

make_error_code

Create an error_code from an error value.

make_error_condition

Create an error_condition from a cond value.

make_work_guard

Create a work guard from an executor.

operator+

Return an iterator n bytes after it.

operator‐

Subtraction operators

read

Asynchronously read data from a stream until the buffer sequence is full.

read_at_least

Asynchronously read at least a minimum number of bytes from a stream.

ready

ready overloads

run

run overloads

run_async

run_async overloads

safe_resume

Resume a coroutine handle with frame‐allocator TLS protection.

set_current_frame_allocator

Set the current frame allocator for this thread.

set_current_thread_name

Set the name of the calling thread.

when_all

when_all overloads

when_any

when_any overloads

write

Asynchronously write an entire buffer sequence to a stream.

write_at_least

Asynchronously write at least a minimum number of bytes to a stream.

operator==

Test whether two iterators refer to the same byte.

operator<=>

Order two iterators by byte position.

Concepts

Name

Description

AwaitSuspendResult

Requires a valid await_suspend return type.

ConstBuffer

Requires a type to convert to const_buffer.

ConstBufferSequence

Requires a type to be a ConstBuffer, or a range of them.

ContextAwaitable

Requires an awaitable whose await_suspend takes the execution environment.

ContextAwaitableRange

Requires a sized input range whose value type satisfies ContextAwaitable.

ContextRunnable

Requires a ContextAwaitable that run functions can start from outside a coroutine.

ExecutionContext

Requires a type to expose a noexcept get_executor() bound to its own resources.

Executor

Requires a copyable type to dispatch or post continuations to its context.

MutableBuffer

Requires a type to convert to both mutable_buffer and const_buffer.

MutableBufferSequence

Requires a type to be a MutableBuffer, or a range of them.

ReadStream

Requires read_some to return a ContextAwaitable decomposing to an error code and a size.

Stream

Requires a type to satisfy both ReadStream and WriteStream.

WriteStream

Requires write_some to return a ContextAwaitable decomposing to an error code and a size.

awaitable_decomposes_to

Requires an awaitable's result to destructure into the given types.

decomposes_to

Requires a type to destructure via structured bindings into the given types.

Created with MrDocs