Re: [gtkmm] I/O Connection::disconnect() doesn't work as expected.
- From: MHL Schulze t-online de (Martin Schulze)
- To: ebuddington wesleyan edu
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] I/O Connection::disconnect() doesn't work as expected.
- Date: Wed, 25 Sep 2002 21:56:55 +0200
Am 24.09.2002 19:33 schrieb(en) Eric Buddington:
using g[td]kmm-1.3.21.
My app calls Glib::signal_io.connect to watch various file
descriptors, and this generally works.
When my callback function returns 'false', the callback is no longer
called. This is good.
When my callback calls 'connection.disconnect()', then returns 'true',
the interface does not update and an strace shows mad calls to poll().
Shouldn't these be the same? I am assuming that the Connection object
returned from the connect() call affects the same underlying
connection that is affected by my callback's return value, so if I
disconnect the signal, I expect the callback's return value not to
matter.
Or is the connection implicitly 'used up' when my callback is called,
and regenerated wwhen it returns 'true', so calling
connection.disconnect() is undone by returning 'true'.
I hope this is understandable; I'm not sure what all the proper terms
are.
Sorry for answering your emails in reversed order. I haven't followed
your thread completely but to point out the expected behaviour:
connection.disconnect() and returning 'true' in the callback function
should have the same effect, i.e. stop further calls of the callback
function, remove the file descriptor from the poll table and internally
destroy the 'connection node' and the 'source' structure. No recovery
is possible as all information about the filedescriptor to poll and
the callback function to call is deleted.
If you experience memory leaks or other problems returning 'true' in
your callback functions then please file another bug report at bugzilla.
(http://bugzilla.gnome.org)
Regards,
Martin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]