[libnet-dbus-perl] 37/335: Run the callbacks before creating the bitmasks for select
Intrigeri
intrigeri at moszumanska.debian.org
Sat Mar 21 01:07:17 UTC 2015
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch experimental
in repository libnet-dbus-perl.
commit fdb44e1a426b2e30f108d816b483d5c5e1677e32
Author: Daniel P. Berrange <dan at berrange.com>
Date: Mon Dec 27 16:34:17 2004 +0000
Run the callbacks before creating the bitmasks for select
---
lib/Net/DBus/Reactor.pm | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/Net/DBus/Reactor.pm b/lib/Net/DBus/Reactor.pm
index 17b2f5f..3117fa9 100644
--- a/lib/Net/DBus/Reactor.pm
+++ b/lib/Net/DBus/Reactor.pm
@@ -321,7 +321,13 @@ not required in day-to-day use.
sub step {
my $self = shift;
+
+ my @callbacks = $self->_dispatch_hook();
+ foreach my $callback (@callbacks) {
+ $callback->invoke;
+ }
+
my ($ri, $ric) = $self->_bits("read");
my ($wi, $wic) = $self->_bits("write");
my ($ei, $eic) = $self->_bits("exception");
@@ -331,13 +337,7 @@ sub step {
$self->{running} = 0;
return;
}
-
- my @callbacks = $self->_dispatch_hook();
-
- foreach my $callback (@callbacks) {
- $callback->invoke;
- }
-
+
my ($ro, $wo, $eo);
my $n = select($ro=$ri,$wo=$wi,$eo=$ei, (defined $timeout ? ($timeout ? $timeout/1000 : 0) : undef));
@@ -369,11 +369,11 @@ sub _bits {
my $self = shift;
my $type = shift;
my $vec = '';
-
+
my $count = 0;
foreach (keys %{$self->{fds}->{$type}}) {
next unless $self->{fds}->{$type}->{$_}->{enabled};
-
+
$count++;
vec($vec, $_, 1) = 1;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git
More information about the Pkg-perl-cvs-commits
mailing list