[Stackless] stacklesssocket.py, and showing tasklets

Alec Flett alecf at flett.org
Wed Apr 11 00:08:22 CEST 2007


I've got a situation where I'm using stacklesssocket.py to talk over a
chatty protocol (i.e. read/write with linefeeds in between each) - the
client basically does stuff like:

s.sendall(outbuffer)

while "\n" not in outbuffer:
    outbuffer += s.recv(4096)

(There's obviously other code in there to deal with the data after the "\n"
if any, but that's another story)

my theory is that stacklessocket is trying to keep reading up to 4096 bytes,
even though the code only wants "up to" 4096 bytes.. so effectively recv
gets blocked even though it has all its data.

My first instinct was to interrupt the world and look at the state of
running tasklets - basically do a stack dump of each tasklet and see where
they're blocked.

I can't find anything in the stackless module that would support this. Any
hints?

Alec
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20070410/3f69c296/attachment.htm>
-------------- next part --------------
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless


More information about the Stackless mailing list