Add a thread safety warning to write_object()

This commit is contained in:
Robbert van der Helm
2020-05-19 11:33:34 +02:00
parent 3985e10319
commit c2fceb6e4a
+4
View File
@@ -41,6 +41,10 @@ using InputAdapter = bitsery::InputBufferAdapter<B>;
* @param buffer The buffer to write to. This is useful for sending audio and
* chunk data since that can vary in size by a lot.
*
* @warning This operation is not atomic, and calling this function with the
* same socket from multiple threads at once will cause issues with the
* packets arriving out of order.
*
* @relates read_object
*/
template <typename T, typename Socket>