Am 20.03.2013 08:57, schrieb Tanu Kaskinen: > On Tue, 2013-03-19 at 13:20 +0100, Thomas Martitz wrote: >> Am 19.03.2013 10:56, schrieb Tanu Kaskinen: >>> I'd be OK with adding pa_simple_writable/readable_size(). I believe the >>> multi-threading aspect of adding the write/read callbacks unavoidably >>> makes writing applications not-simple, so the simple API probably >>> shouldn't have those callbacks. >>> >> It's not unlikely that an application that uses blocking or polling >> methods uses an extra thread for that, which it wouldn't do if it could >> use the callback method. So in this case the callback would simplify the >> application, because the multi threading aspect is not in the >> application logic but in pulseaudio. I don't know how common this case >> is, but I would expect it's rather common. > The applications would still need to be aware of the threading. > pa_simple_read/write() is expected to be done from the main thread, so > the application necessarily needs to implement some communication method > between the two threads. > (Resent, this time to the list and not in private to Tanu). Oh well, I agree, if you can't call the simple API from within the callback then I agree the callback probably shouldn't be part of it. Best regards.