[Stackless] Santa concurrency problem

Carlos Eduardo de Paula carlosedp at gmail.com
Fri Mar 30 18:37:39 CEST 2007


Hi Chris,

take a look at the changes I made in QueuedTimer, It now uses a
heapq.. I kept the old way commented just for clarification.. Do you
think it performs better now or its the same.

http://dpaste.com/hold/7648/

For the CPU time issue, I didnt see any problems with CPU usage on
this class in my examples.. maybe someone has an issue on it...

Carlos

On 3/30/07, Carlos Eduardo de Paula <carlosedp at gmail.com> wrote:
> I think i can take it.. but i need some clues and pointers on how to do both :)
>
> Carlos
>
> On 3/28/07, Christian Tismer <tismer at stackless.com> wrote:
> >
> > On 28.03.2007, at 23:25, Carlos Eduardo de Paula wrote:
> >
> > > Based on Christian's last addition for the sleep management, I created
> > > a version of the producer-consumer app using that sleep manager.
> > >
> > > The code is here: http://dpaste.com/hold/7549/
> > >
> > > If anyone wants to take a look if it has been well used and report
> > > back i will be glad...
> > >
> > > Maybe we can get to a place where we can build a utility library
> > > containing these most used functions and classes, like uthread does...
> >
> > Thanks for adding this code, although it was created under a lot of
> > pressure, so not everything is as worked out as it should be.
> > I think the monkey-patching is quite ok - Stackless users always
> > need to be more aware of what they are doing than normal beings.
> >
> > What I dislike is for now:
> > - the use of min() on a dict might be fast on small dicts, but replacing
> >    it with a priority queue is maybe more appropriate.
> > - the issue about burning all CPU time should be handled.
> >    maybe with a default handler which uses time.sleep() with small
> >    intervals, but providing a hook to add real signal-aware code,
> > instead.
> >
> > any takers?
> >
> > cheers - chris
> >
> >
>
>
> --
> -------------------------------------------------------------------
> Visit Stackless Examples Project
> http://code.google.com/p/stacklessexamples/
> Stackless Python - www.stackless.com
> -------------------------------------------------------------------
>


-- 
-------------------------------------------------------------------
Visit Stackless Examples Project
http://code.google.com/p/stacklessexamples/
Stackless Python - www.stackless.com
-------------------------------------------------------------------

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



More information about the Stackless mailing list