Re: Infinite Loop with Glib::IO->add_watch()

On Sat, Sep 11, 2004 at 18:14:52 +0200, A. Pagaltzis wrote:
* Jan Hudec <bulb ucw cz> [2004-09-11 11:35]:
On Wed, Sep 08, 2004 at 10:51:02 -0700, Mike Schilli wrote:
the notion

     Gtk2::Helper->add_watch(fileno(READHANDLE), 'in', \&callback);

instead of

     Glib::IO->add_watch(fileno(\*READHANDLE), 'in', \&callback);

Are these equivalent or do you prefer one or the other?

Don't ask others what they prefer. Ask yourself what you
prefer.  Operationaly, they are completely equivalent.

Actually, they're not.  Gtk2::Helper registers the callback for
G_IO_HUP so it will receive EOF / pipe close events in addition
to the events when data is available.

Oops. I was confused by the difference between READHANDLE and
\*READHANDLE and didn't realize the difference between Helper and IO.

                                                 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]