[avahi] browsing without event loop ?

Lennart Poettering lennart at poettering.net
Wed Sep 12 07:07:06 PDT 2007


On Tue, 04.09.07 08:31, Olivier (o.r-d at laposte.net) wrote:

> 
> Lennart Poettering wrote:
> 
> > You need some kind of event loop to process events coming from the
> > Avahi server. It may be any event loop implementation that dbus-python
> > supports.
> That is where the problem is. My main loop is allready defined as being 
> the python xmlrpcserver so I need to do the avahi queries in another 
> thread and I do not think I can run the qt or gtk loop in  a second 
> thread ...

The gtk event loop is theads-aware but not thread-safe. i.e. you can
make it thread-safe by applying your own locks.

Hmm, can't you get xmlrpcserver to work on a real event loop? Maybe
twisted? Avahi can be integrated into almost any event loop. If the
xmlrpcserver doesn't allow you to integrate other stuff into its event
loop, than this is a serious limitation of it and you should be
complaining to its developers!

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the avahi mailing list