[USRP-users] UHD and Thread Safety

Ben Hilburn ben.hilburn at ettus.com
Thu Dec 11 15:14:45 EST 2014

Actually, what I just said is wrong, because calling those functions will
result in packets being sent from the device.

So, no. Nothing is thread safe, and even polling for sensor data could
cause issues.


On Thu, Dec 11, 2014 at 12:12 PM, Ben Hilburn <ben.hilburn at ettus.com> wrote:

> Hi Nathan -
> Generally, any UHD function that doesn't involve streaming is *not *thread-safe.
> So if you called "get_time_now" from two separate threads at the same time,
> that is *not* a thread-safe operation.
> If all you are doing is polling sensors from a thread that is different
> from the thread in which you started streaming, you should be OK. But, it
> is not technically thread safe.
> Cheers,
> Ben
> On Tue, Dec 9, 2014 at 1:31 PM, Perelman, Nathan via USRP-users <
> usrp-users at lists.ettus.com> wrote:
>> I’ve been assuming that calls to UHD functions that don’t change settings
>> on the USRP are generally thread safe and can be called from another thread
>> even while a capture is ongoing. Is this an accurate assumption? The
>> functions I’m calling are get_mboard_sensor() (for GPS information and
>> ref_locked) and get_time_now(). Thanks.
>> -Nathan Perelman
>> _______________________________________________
>> USRP-users mailing list
>> USRP-users at lists.ettus.com
>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141211/c6f56dc3/attachment-0002.html>

More information about the USRP-users mailing list