refactor(eventloop): Use concurrent queue for events

Events are now enqueued using a thread safe concurrent queue
which makes the previous eventloop locking redundant.
This commit is contained in:
Michael Carlberg 2016-10-29 06:48:51 +02:00
parent 92900e78d6
commit 1075144b00
15 changed files with 5263 additions and 384 deletions
include/modules

View file

@ -165,7 +165,7 @@ namespace modules {
const chrono::milliseconds framerate{m_animation_packetloss->framerate()};
const auto dur = chrono::duration<double>(framerate);
while (enabled()) {
while (running()) {
if (m_connected && m_packetloss)
broadcast();
sleep(dur);