diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-04-20 16:20:52 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-04-24 14:19:10 -0700 |
commit | 9830730918ee9b93d9ed14bb53074ed02355ef4e (patch) | |
tree | 9db1f5f6523c71da1a4bfdd85935ed5b03507221 | |
parent | 0f30ef70f08b745755fdf362e05901039434a242 (diff) | |
download | uhd-9830730918ee9b93d9ed14bb53074ed02355ef4e.tar.gz uhd-9830730918ee9b93d9ed14bb53074ed02355ef4e.tar.bz2 uhd-9830730918ee9b93d9ed14bb53074ed02355ef4e.zip |
log: Allow logging to block
This means it's very unlikely that logging messages get dropped, but the
downside is that LOG macros can block for up to 250 ms. This is very
unlikely though.
Note that fastpath logging does not have this feature. It's always fast,
and might drop messages.
-rw-r--r-- | host/lib/utils/log.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/utils/log.cpp b/host/lib/utils/log.cpp index 10baaf3f4..78c02a4c5 100644 --- a/host/lib/utils/log.cpp +++ b/host/lib/utils/log.cpp @@ -253,7 +253,8 @@ public: void push(const uhd::log::logging_info& log_info) { - _log_queue.push_with_haste(log_info); + static const double PUSH_TIMEOUT = 0.25; // seconds + _log_queue.push_with_timed_wait(log_info, PUSH_TIMEOUT); } void push_fastpath(const std::string &message) |