[Stackless] GIL issue? Re: Santa concurrency problem

Andrew Francis andrewfr_ice at yahoo.com
Fri Mar 30 19:18:16 CEST 2007

Hello Christian, Richard, Brian and Colleagues:

On 28.03.2007, at 19:45, Brian Zimmer wrote:

> I removed all the wxPython code but it still
exhibits >the same behaviour as the original sleep in
that it >pins a cpu in a busy wait. The best overall
solution >appears to be (in my limited   understanding
> Stackless) the tiny sleep 0.001 seconds because it
>doesn't appear to significantly change the behaviour
>of the application and keeps the stackless process
out >of the top spot in top.  

Christian Tismer :

>Ah, sure. In that code, I didn't try to save cycles,
>but to provide rather exact timing. Of course the
tiny >sleep makes sense.This application had always
lots of >work, so this was not an issue.

(File under Brainstorming)

Once again, I ran into my long time problem of "losing
deferreds." This was despite redesigning my
application to run Twisted in a separate thread. 

I noticed that an earlier example using the
Twisted-in-a-separate-thread approach that worked had
a time.sleep(). So I placed a time.sleep(.001) into my
code, and it worked. Since my code also implemented a
tight loop with most of the tasklets blocked, I
checked the CPU : it was at 100%.

>From a previous thread involving Carlos, I commented
that the time.sleep() has a significance besides
sleeping. time.sleep() will also release the GIL. In
my case, the Twisted component could do its stuff. 

I don't know if my problem and the time.sleep in the
Santa concurrency are somehow related. Since it seems
the GIL plays a role in my application, I am
interested in optimizing its performance with
Stackless. Can anyone provide some insights?


Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list