ILLIXR: Illinois Extended Reality Testbed
|
A handle which can publish events to a topic. More...
#include <switchboard.hpp>
Public Member Functions | |
writer (topic &topic_) | |
template<class... Args> | |
ptr< specific_event > | allocate (Args &&... args) |
Like new /malloc but more efficient for this specific case. More... | |
void | put (ptr< specific_event > &&this_specific_event) |
Publish ev to this topic. More... | |
A handle which can publish events to a topic.
|
inline |
Like new
/malloc
but more efficient for this specific case.
There is an optimization available which has not yet been implemented: switchboard can reuse memory from old events, like a slab allocator. Suppose module A publishes data for module B. B's deallocation through the destructor, and A's allocation through this method completes the cycle in a double-buffer (AKA swap-chain).
|
inline |
Publish ev
to this topic.
TODO: Revisit for solution that guarantees uniqueness