[avahi] browsing without event loop ?
Ludovic Courtès
ludovic.courtes at laas.fr
Mon Sep 3 07:57:42 PDT 2007
Hi,
Lennart Poettering <lennart at poettering.net> writes:
> Why would you want to avoid running an event loop anyway?
My guess is that it's because it's cumbersome.
Sometimes, you'd like to write something like:
for machine in services(type=_workstation._tcp)
do
shutdown $machine
done
Using the call-back API makes it hard to express such simple things.
FWIW, I'm planning to add a "threaded" API to Guile-Avahi, whereby the
event loop would be run in a separate thread. User threads would send
requests such as "list all services of a given type" to the
event-processing thread and would block until the event-processing
thread is done (e.g., until "ALL_FOR_NOW" or an error is caught).
Thanks,
Ludovic.
More information about the avahi
mailing list