zeroconf: Make Avahi usage in m-z-publish async

System Internals / PulseAudio - Arun Raghavan [collabora.co.uk] - 3 June 2013 14:08 UTC

This pushes all avahi-client code to a threaded mainloop from the PA mainloop context. We need to do this because avahi-client makes blocking D-Bus calls, and we don't want to block the mainloop for that long.

The only exception to this now that I don't see a workaround for is during module unload time. However, this shouldn't be a huge problem since in most cases, this will only happen at server shutdown time.

The bulk of the change is partitioning the data so that PA core objects only (well, mostly) get accessed in the PA mainloop and Avahi calls happen only in the Avahi threaded mainloop.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=58758

5ae5dee zeroconf: Make Avahi usage in m-z-publish async
src/modules/module-zeroconf-publish.c | 300 ++++++++++++++++++++++++---------
1 file changed, 216 insertions(+), 84 deletions(-)

Upstream: cgit.freedesktop.org


  • Share