On Mon Sep 11 12:33:21 2006, emmanuel.rodriguez@gmail.com wrote:
Show quoted text> From my understanding of the library, DBus performs all signal
> communication asynchronously. This requires the usage of an event loop
> which is provided through the class Net::DBus::Reactor. The problem is
> that certain programs have their own event loop, for instance the
> libraries GLib, GTK and GStreamer.
>
> Since Net::DBus doesn't provide a way to be handled by another even
> loop, using DBus with these libraries causes some problems when dealing
> with asynchronous messages.
>
> The package Linux::Inotify2 provides a good example on how to use
> different event loops.
The reason Net::DBus doesn't allow use of GLib currently is that I
didn't want to force user's Net::DBus to have glib shared libraries
installed. To address this issue I am creating a separate
Net::DBus::GLib module to provide integration with the GLib event loop.
The code to use GLib event loop instead of the pure-Perl reactor would
look something like:
my $bus = Net::DBus::GLib->session();
my $service = $bus->export_service("org.designfu.SampleService");
my $object = SomeObject->new($service);
Glib::MainLoop->new()->run();
Will update this ticket when the GLib addon is available.