Re: Moving to bonjour over howl
- From: Alexander Larsson <alexl redhat com>
- To: Lennart Poettering <mztabzr 0pointer de>
- Cc: desktop-devel-list gnome org
- Subject: Re: Moving to bonjour over howl
- Date: Fri, 16 Sep 2005 17:17:03 +0200
On Fri, 2005-09-16 at 16:57 +0200, Lennart Poettering wrote:
> On Fri, 16.09.05 10:01, Alexander Larsson (alexl redhat com) wrote:
> > I'm sure your hot new code is a thousand times nicer than the dns-sd
> > stuff in GNOME-VFS. However, that code is the way it is for a reason.
> > Since this code is used by gnome-vfs modules it needs to be threadsafe,
> > it can't rely on the glib mainloop, and it needs to supply synchronous
> > operations to match the synchronous gnome-vfs file operations.
>
> This cuts no ice.
Ice? I'm not sure what you mean.
> Avahi doesn't depend on the GLIB main loop. In fact it is not
> difficult to use Avahi without any real main loop at all. As a matter
> of fact we offer a first class Qt3/Qt4 main loop adapter for
> Avahi.
I'm not saying Avahi needs a mainloop. However, GServiceBrowser clearly
needs one. Anyway, I was just explaining why the gnome-vfs dns-sd code
looks like it does. It seemed like David just looked at it and said
"ewww, this is ugly, I'll do my own thing instead" without an
understanding of why it looks like it does.
> Avahi doesn't use any threading/locking primitives itself. However,
> this doesn't mean it isn't thread safe. As long as you use Avahi from
> a single thread at the same time only it is perfectly legal to use it
> in a multi-threaded environment. In fact the avahi-sharp bindings use
> Avahi that way. A minimal event loop is run in its own thread and
> the little locking needed is done entirely with C# locking
> primitives.
Then it might be hard to use Avahi for gnome-vfs. Gnome-vfs is threaded,
in that asynchronous i/o operations are run in worker threads. These
worker threads might need to do dns-sd calls when reading e.g.
network:///. gnome-vfs itself can lock around calls to the dns-sd engine
so that use of it from gnome-vfs is serialized. However, what if the app
using gnome-vfs also uses Avahi itself? Is it possible to instantiate a
separate context of Avahi? That would make this possible.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a benighted gay dwarf with a passion for fast cars. She's a manipulative
impetuous magician's assistant who inherited a spooky stately manor from her
late maiden aunt. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]