MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ enqueue_batch()

void MayaFlux::Core::InputManager::enqueue_batch ( const std::vector< InputValue > &  values)

Enqueue multiple input values.

Parameters
valuesVector of input values

Definition at line 110 of file InputManager.cpp.

111{
112 if (values.empty())
113 return;
114
115 bool any_pushed = false;
116 for (const auto& value : values) {
117 if (m_queue.push(value)) {
118 any_pushed = true;
119 } else {
121 "Input queue full during batch, dropping oldest events");
122 }
123 }
124
125 if (any_pushed) {
126 m_queue_notify.store(true);
127 m_queue_notify.notify_one();
128 }
129}
#define MF_WARN(comp, ctx,...)
std::atomic< bool > m_queue_notify
Memory::LockFreeQueue< InputValue, MAX_QUEUE_SIZE > m_queue
@ InputManagement
Input management (Core::InputManager)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Journal::InputManagement, m_queue, m_queue_notify, and MF_WARN.