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

◆ poll_thread_func()

void MayaFlux::Core::TabletBackend::poll_thread_func ( )
private

Definition at line 685 of file TabletBackend.cpp.

686{
687 while (!m_stop_requested.load()) {
688 std::vector<std::shared_ptr<TabletDevice>> snapshot;
689
690 {
691 std::lock_guard lock(m_devices_mutex);
692 snapshot.reserve(m_devices.size());
693 for (auto& [path, device] : m_devices) {
694 if (device->active.load() && device->handle)
695 snapshot.push_back(device);
696 }
697 }
698
699 if (snapshot.empty()) {
700 std::this_thread::sleep_for(std::chrono::milliseconds(20));
701 continue;
702 }
703
704 for (auto& device : snapshot) {
705 poll_device(*device);
706 }
707 }
708}
std::atomic< bool > m_stop_requested
void poll_device(TabletDevice &device)
std::unordered_map< std::string, std::shared_ptr< TabletDevice > > m_devices

References m_devices, m_devices_mutex, m_stop_requested, and poll_device().

Referenced by start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: