holoscan::SidecarDispatchQueue
holoscan::SidecarDispatchQueue
Thread-safe queue + dispatch thread for deferred native-descriptor sidecar receives.
Both the DDS and Zenoh transports receive native-descriptor messages on a transport callback thread that must not block. This queue decouples receive from dispatch: the transport callback enqueues items, and a dedicated thread dequeues and delivers them to the PubSubContext receive callback.
Usage: // In transport constructor: sidecar_queue_ = std::make_unique<SidecarDispatchQueue>(this { std::lock_guard<std::mutex> lock(my_mutex_); return receive_callback_; });
// When subscribing: sidecar_queue_->start();
// On transport callback thread: sidecar_queue_->enqueue(gid, std::move(payload), metadata);
// On shutdown: sidecar_queue_->stop();
Constructors
SidecarDispatchQueue
Overload 1
Copy (deleted)
Destructor
~SidecarDispatchQueue
Assignment operators
operator=
Methods
start
Start the dispatch thread. No-op if already running.
stop
Stop the dispatch thread and drain the queue.
enqueue
Enqueue a received sidecar message for dispatch. Thread-safe.