diff --git a/third-party/rsutils/include/rsutils/signal.h b/third-party/rsutils/include/rsutils/signal.h index 7d2bfb717a..bf799c9068 100644 --- a/third-party/rsutils/include/rsutils/signal.h +++ b/third-party/rsutils/include/rsutils/signal.h @@ -112,7 +112,11 @@ class signal } // How many subscriptions are active - size_t size() const { return _impl->subscribers.size(); } + size_t size() const + { + std::lock_guard< std::mutex > locker( _impl->mutex ); + return _impl->subscribers.size(); + } };