[Stackless] Santa concurrency problem

Brian Zimmer bzimmer at ziclix.com
Wed Mar 28 19:45:29 CEST 2007


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 of 
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.  Of course this is highly 
dependent on the application, as I'm learning.

thanks, brian

On Mar 28, 2007, at 09:16 AM, Christian Tismer wrote:

>
> On 28.03.2007, at 17:54, Greg Hazel wrote:
>
>>> The code uses a bit of wxPython, but that can be removed.
>>
>> Just a warning - Stackless and wxPython likely have problems together.
>> With greenlets, wxYield can cause serious errors, since it does stack
>> swapping of it's own. On Windows, at least.
>
> Sure, there is a load of things to avoid with wx.
> Mouse events for instance are (were 2 years ago) living
> as a local variable on the stack, so if you want a tasklet
> driven mouse driver (which is very nice), you need to
> save all mouse status in an extra object and pass that to
> the driver.
> wxYield I know nothing about, but using concurrent
> stack switching approaches is of course a bad idea.
>
> As said this example is not about wx, but some idea
> how to patch time-aware behavior into stackless.
>
> ciao -- chris
>
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless
>


_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list