Infinite Loop with Glib::IO->add_watch()
- From: "Mike Schilli" <b2b perlmeister com>
- To: gtk-perl-list gnome org
- Subject: Infinite Loop with Glib::IO->add_watch()
- Date: Tue, 7 Sep 2004 22:27:04 -0700
Hi there,
when I'm using add_watch() to register a watch on a filehandle, the
callback associated with it is called infinitely:
Glib::IO->add_watch(fileno(\*READHANDLE),
'in', sub { print "got something!\n"; 1; });
prints out
got something!
got something!
got something!
...
even if there's only one event. Is there a way to prevent this without
returning 0 in the callback and therefore disabling the watch?
--
-- Mike
Mike Schilli
b2b perlmeister com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]