9#include <rdma/fabric.h>
10#include <rdma/fi_eq.h>
18 class EventQueue :
public std::enable_shared_from_this<EventQueue>
33 ::fi_eq_attr
raw()
const noexcept;
54 ::fid_eq*
raw() noexcept;
59 ::fid_eq const*
raw() const noexcept;
std::optional< Event > handleReadResult(ssize_t, std::uint32_t, ::fi_eq_entry const &)
Handle the result of a blocking or non-blocking read.
void operator=(EventQueue const &)=delete
void close()
Releases all underlying resources. This is called from the destructor and the move-assignment operato...
std::shared_ptr< Fabric > _fabric
std::optional< Event > readBlocking(std::chrono::steady_clock::duration timeout)
Perform a blocking read on the event queue.
::fid_eq * raw() noexcept
Returns a raw handle to the event queue.
EventQueue(EventQueue const &)=delete
static std::shared_ptr< EventQueue > open(std::shared_ptr< Fabric >, Attributes const &attr=Attributes::defaults())
Create a new event queue associated with the specified fabric.
std::optional< Event > read()
Perform a non-blocking read on the event queue. If no event is available in the queue,...
EventQueue & operator=(EventQueue &&)=delete
EventQueue(EventQueue &&)=delete
Type to represent an event entry from an EventQueue.
RAIII wrapper around a libfabric fabric object (fid_fabric).
Attributes to configure newly created event queues.
static Attributes defaults()
Creates a configuration with all values set to reasonable defaults.
::fi_eq_attr raw() const noexcept
Returns the raw libfabric version of this object.