Re: [PATCH] GIterator
- From: Andy Wingo <wingo pobox com>
- To: gtk-devel-list gnome org
- Subject: Re: [PATCH] GIterator
- Date: Sat, 8 Jun 2002 09:19:27 -0400
On Sat, 08 Jun 2002, James Henstridge wrote:
> Joel Becker wrote:
> > I've also added some nice convenience functions to do things
> >like iterate GLists and create a GValueIterator from a GIterator. As
> >a side effect of the implementation, "generators" ala python are also
> >quite possible. There is an example of a generator in testglib.c.
> I talked with Joel on IRC, and this is a bit of a misunderstanding on
> the term generator. You would need to allocate a new stack for the
> generator, and probably play some setjmp()/longjmp() hacks to implement
> one (it might be a bit easier using a cothread library though).
Just thought I'd chime in at this point -- I've adapted the portable
machine context switching code from GNU Pth into a cothread library that
is actively used by one of GStreamer's schedulers. It's in a standalone
cvs module, cothreads/ under gstreamer's sf cvs repository. The intent
is to do some more work on it and eventually propose it for inclusion
into GLib. It's pretty good right now, but I need to run through it and
clean up a few things and write some docs.
Anyway, wanted to let you know of this project, as you brought up the
] [Thread Prev