Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Callback_handler not run as a infinite loop, tempo changes not tracked #14

Closed
tbazin opened this issue Sep 14, 2021 · 1 comment · Fixed by #15
Closed

Regression: Callback_handler not run as a infinite loop, tempo changes not tracked #14

tbazin opened this issue Sep 14, 2021 · 1 comment · Fixed by #15

Comments

@tbazin
Copy link
Contributor

tbazin commented Sep 14, 2021

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.

@2bbb
Copy link
Owner

2bbb commented Sep 15, 2021

@tbazin

omg!!
i can't remember what i want to do, but maybe you are correct!
please submit PR!

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants