From 6fec269844b4e3e73a2c3223e8d4e3daaa75effc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 26 Dec 2016 20:09:10 +0100 Subject: [PATCH] output/SharedPipeConsumer: add thread-safety documentation --- src/output/SharedPipeConsumer.hxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/output/SharedPipeConsumer.hxx b/src/output/SharedPipeConsumer.hxx index 6a1734f72..779018bc6 100644 --- a/src/output/SharedPipeConsumer.hxx +++ b/src/output/SharedPipeConsumer.hxx @@ -30,6 +30,11 @@ class MusicPipe; /** * A utility class which helps with consuming data from a #MusicPipe. + * + * This class is intentionally not thread-safe. Since it is designed + * to be called from two distinct threads (PlayerThread=feeder and + * OutputThread=consumer), all methods must be called with a mutex + * locked to serialize access. Usually, this is #AudioOutput::mutex. */ class SharedPipeConsumer { /**