Re: GSource and file descriptors
- From: Joel Becker <jlbec evilplan org>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GSource and file descriptors
- Date: Fri, 11 May 2001 21:38:44 +0100
On Fri, May 11, 2001 at 04:20:14PM -0400, Owen Taylor wrote:
> It's called g_io_channel_add_watch().
Ok, didn't think of that. I've generally avoided GIOChannel.
It sometime ago seemed clunky.
> I'd be hesitant, certainly. IO channel watches are the normal way to
> do this.
Right, I'll try that.
On this and other subjects, I've been endeavouring to use the
online docs for this sort of stuff. The GSource documentation is pretty
rough. g_source_new and g_source_add_poll seemed pretty obvious for fd
related work, but almost nowhere did they mention the need to attach the
source to a certain GMainContext, let alone the g_source_attach
function. Nor did they mention g_io_channel_add_watch() the common
case.
In addition, are there plans to add g_timeout and g_idle
versions that accept a non-default GMainContext? I'm aware that the
default context is the common case, but that doesn't mean a user should
have to go through all of the GSource rigamarole just to set a timeout
in thread #2.
Thanks
Joel
--
Life's Little Instruction Book #207
"Swing for the fence."
http://www.jlbec.org/
jlbec evilplan org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]