MayaFlux 0.2.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 107 of file InputManager.cpp.

108{
109 if (values.empty())
110 return;
111
112 bool any_pushed = false;
113 for (const auto& value : values) {
114 if (m_queue.push(value)) {
115 any_pushed = true;
116 } else {
118 "Input queue full during batch, dropping oldest events");
119 }
120 }
121
122 if (any_pushed) {
123 m_queue_notify.store(true);
124 m_queue_notify.notify_one();
125 }
126}
#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.