diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-08-22 14:49:15 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-08-22 15:33:56 -0700 |
commit | dd1606607e4612d3949764a0c5fb213a4593b56b (patch) | |
tree | abc7726c9ef0bd3045c39a7840b4d9e049527e33 /host/include | |
parent | 69e4b0ed7f80fc241e9b69f05e2af0d9f52b3521 (diff) | |
download | uhd-dd1606607e4612d3949764a0c5fb213a4593b56b.tar.gz uhd-dd1606607e4612d3949764a0c5fb213a4593b56b.tar.bz2 uhd-dd1606607e4612d3949764a0c5fb213a4593b56b.zip |
docs: Improve language on threading for recv() and send()
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/stream.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
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 |