#include <epoch_context.hpp>
◆ Phase
| Enumerator |
|---|
| Pending | The epoch is not yet active (i.e. it is in the future)
|
| Started | The epoch has started but is waiting for a writer task.
|
| Writing | The epoch is active and waiting for the writers to finish, with no writer currently running.
|
| Reading | The epoch is active and waiting for readers to finish.
|
| Finished | The epoch is not active, and readers have finished.
|
◆ EpochContext() [1/2]
| uni20::async::EpochContext::EpochContext |
( |
| ) |
|
|
inline |
◆ EpochContext() [2/2]
| uni20::async::EpochContext::EpochContext |
( |
std::shared_ptr< EpochContext > |
next | ) |
|
|
inlineexplicit |
Construct an EpochContext given an existing next epoch.
- Note
- this is backwards propogation, the counter is initialized to next->counter_ - 1
◆ ~EpochContext()
| uni20::async::EpochContext::~EpochContext |
( |
| ) |
|
|
inline |
◆ debug_snapshot()
| DebugSnapshot uni20::async::EpochContext::debug_snapshot |
( |
| ) |
const |
|
inline |
Return a point-in-time snapshot of epoch state and queued tasks.
◆ make_previous()
| static std::shared_ptr< EpochContext > uni20::async::EpochContext::make_previous |
( |
std::shared_ptr< EpochContext > |
next | ) |
|
|
inlinestatic |
Helper factory to construct the previous epoch in a reverse-mode chain.
◆ reader_task_handles()
| std::vector< std::coroutine_handle<> > uni20::async::EpochContext::reader_task_handles |
( |
| ) |
const |
|
inline |
Return coroutine handles currently queued as readers in this epoch context.
◆ set_next_epoch()
| void uni20::async::EpochContext::set_next_epoch |
( |
std::shared_ptr< EpochContext > |
next | ) |
|
|
inline |
◆ start() [1/2]
| void uni20::async::EpochContext::start |
( |
| ) |
|
|
inline |
◆ start() [2/2]
| void uni20::async::EpochContext::start |
( |
std::exception_ptr |
eptr | ) |
|
|
inline |
◆ start_reading()
| void uni20::async::EpochContext::start_reading |
( |
| ) |
|
|
inline |
◆ try_debug_snapshot()
| bool uni20::async::EpochContext::try_debug_snapshot |
( |
DebugSnapshot & |
snapshot | ) |
const |
|
inline |
Try to return a point-in-time snapshot without blocking.
- Parameters
-
| snapshot | Destination for the snapshot when the lock is acquired. |
- Returns
- true if the snapshot was acquired; false if the epoch lock was busy.
◆ writer_task_handles()
| std::vector< std::coroutine_handle<> > uni20::async::EpochContext::writer_task_handles |
( |
| ) |
const |
|
inline |
Return coroutine handles currently queued as writers in this epoch context.
◆ EpochContextReader
◆ EpochContextWriter
◆ EpochQueue
◆ propagate_unhandled_writer_exception
| void propagate_unhandled_writer_exception |
( |
EpochContext * |
epoch, |
|
|
std::exception_ptr |
eptr |
|
) |
| |
|
friend |
Inject an unhandled writer-side coroutine exception into an epoch.
- Parameters
-
| epoch | Target epoch context associated with a writer buffer. |
| eptr | Exception captured by the coroutine promise. |
◆ ReverseEpochQueue
The documentation for this class was generated from the following file: