[Stackless] Eliminating Busy Waits and Unnecssary Sleeps

Edward Faulkner ef at alum.mit.edu
Fri Aug 17 04:10:53 CEST 2007

The semantics of select() on windows are subtly different from unix,
and I don't have a windows installation to test on, so it wouldn't be
easy for me.

If you want to pursue this, here's a place to start:


Alternatively, look into using the core of Twisted as your event loop.
 It looks promising, and cross platform.

best regards,

On 8/10/07, Carlos Eduardo de Paula <carlosedp at gmail.com> wrote:
> Ed,
> I looked into your code and I think that if you could help me on
> porting it to select.select() so it works on windows we solve the
> socket issue. Then I can implement fileIO using windows overlapped and
> keep the select IO for unixes.
> With this we can have a library for socket and file IO on both platforms...
> I know almost nothing about select and poll so it would be a little
> hard for me to port it....
> Carlos
> On 8/8/07, Edward Faulkner <ef at alum.mit.edu> wrote:
> > On 8/8/07, Carlos Eduardo de Paula <carlosedp at gmail.com> wrote:
> > > Here we have one problem, it doesnt works on windows. Only socket
> > > objects can be "selected" on this platform.
> >
> > True.  It would be fairly straightforward to reimplement with
> > select.select instead of select.poll, which I think would work for
> > sockets (but not files) in windows.  I chose poll because it scales
> > better for high numbers of connections.
> >
> > I tested it on Mac and Linux.  I don't have any Windows boxes so it
> > didn't occur to me to think about it until now.
> >
> > As I mention on the web page, this isn't intended as a library that
> > you can just drop in and use.  It would need quite a bit of work (and
> > documentation) to bring it to that point.  I just hope people get some
> > value out of reading it and applying the ideas to their own
> > applications.
> >
> > regards,
> > Ed
> >
> --
> -------------------------------------------------------------------
> Visit Stackless Examples Project
> http://code.google.com/p/stacklessexamples/
> Stackless Python - www.stackless.com
> -------------------------------------------------------------------

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list