From dd1606607e4612d3949764a0c5fb213a4593b56b Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 22 Aug 2019 14:49:15 -0700 Subject: docs: Improve language on threading for recv() and send() --- host/include/uhd/stream.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'host/include') diff --git a/host/include/uhd/stream.hpp b/host/include/uhd/stream.hpp index 85f7eaa0f..7abab5b3c 100644 --- a/host/include/uhd/stream.hpp +++ b/host/include/uhd/stream.hpp @@ -208,7 +208,10 @@ public: * * Note on threading: recv() is *not* thread-safe, to avoid locking * overhead. The application calling recv() is responsible for making - * sure that not more than one thread can call recv() at the same time. + * sure that not more than one thread can call recv() on the same streamer + * at the same time. If there are multiple streamers, receiving from + * different sources, then those may be called from different threads + * simultaneously. * * \param buffs a vector of writable memory to fill with samples * \param nsamps_per_buff the size of each buffer in number of samples @@ -273,6 +276,13 @@ public: * Under a timeout condition, the number of samples returned * may be less than the number of samples specified. * + * Note on threading: send() is *not* thread-safe, to avoid locking + * overhead. The application calling send() is responsible for making + * sure that not more than one thread can call send() on the same streamer + * at the same time. If there are multiple streamers, transmitting to + * different destinations, then those may be called from different threads + * simultaneously. + * * \param buffs a vector of read-only memory containing samples * \param nsamps_per_buff the number of samples to send, per buffer * \param metadata data describing the buffer's contents -- cgit v1.2.3