[Stackless] [threading] Stackless based replacement
senn at maya.com
Fri Sep 26 15:11:00 CEST 2008
On Sep 26, 2008, at 8:04 AM, David Naylor wrote:
> Just a few questions:
> 1) Under what conditions does atomic not work?
Hm. I thought you meant *your* atomic didn't work. We should really
(well, me, at least!) if .set_atomic doesn't work! Can you generate
a test case?
[I didn't look at all your code carefully... it's not clear to me how/
if you are
doing automatic scheduling. ...Oh... Did you read
carefully? .set_atomic does
only stop *automatic* switching of control... explicit passes (e.g.
still "switch" tasklets...]
> 2) Will stackless switch to another tasklet when entering blocking
> (like IO), I know threads do this...
No it won't. In fact, it fundamentally *can't* (since it "runs" in
only one thread).
> 3) Does anyone know where to find how many commands python processes
> before it
> tries to switch threads (I remember something like that happening?)
It's not really "commands"... more like a number of loops through the
Did you mean "threads" or "tasklets"?
If you meant "threads" the answer is complicated... if you meant
then see the parameter to stackless.run.
More information about the Stackless