|
static void callback_handler() { |
|
std::lock_guard<std::mutex> sl(bbb_mutex()); |
|
while(!bbb_tempo_queue().empty()) { |
|
auto &&front = bbb_tempo_queue().front(); |
The callback_handler function should be run as an infinite loop. This was previously handled by libuv:
|
uv_async_init(uv_default_loop(), &async(), bbb_async_cb_handler); |
but has not been replaced after the removal of libuv.
In the absence of such a loop, the callback_handler thread stops after a single run through the different update piles and stops listening to further changes thereafter.
I managed to fixed the issue by enclosing the part after the mutex request into a simple while (true) {... loop, but I'm not 100% certain that this would be the appropriate way of doing things since I actually have no experience whatsoever with C++ 😄 If this approach seems alright though, I'd be happy to submit this very simple PR.
node-abletonlink/src/napi-abletonlink.hpp
Lines 69 to 72 in bc8c344
The
callback_handlerfunction should be run as an infinite loop. This was previously handled by libuv:node-abletonlink/src/node-abletonlink.hpp
Line 95 in 8b5122f
In the absence of such a loop, the callback_handler thread stops after a single run through the different update piles and stops listening to further changes thereafter.
I managed to fixed the issue by enclosing the part after the mutex request into a simple
while (true) {...loop, but I'm not 100% certain that this would be the appropriate way of doing things since I actually have no experience whatsoever with C++ 😄 If this approach seems alright though, I'd be happy to submit this very simple PR.