[Stackless] stackless socket, curiouser and curiouser
Paul Sijben
sijben at eemvalley.com
Mon Feb 26 13:30:27 CET 2007
I have the following code
def receive(self,mysocket=None):
stack=self
print "Stack.receive"
#raise Exception
while 1:
#try:
print "while"
if mysocket:
res= mysocket.recvfrom(8192)
else:
res = self.s.recvfrom(8192)
#PROFILEIN("recv")
print "res=",res
the socket is a stacklesssocket.
when I call the thing I ought to get a result, or nothing as asyncore is
non-blocking. However I was not expecting to be dropped back up the
stack to the beginning of the Threading.thread (or the stackless thread
for that matter) that spawned the thing without as much as an exception!
I am getting the following output:
dispatcher loop
Stack.receive
while
dispatcher loop
Stack.receive
while
dispatcher loop
Stack.receive
while
etc.... Well that tells me that the recvfrom throws me back down the
function stack. I am baffled as to why.
Can someone /please/ explain this to me? (and of course what I should to
to get the expected result)
Paul
--
Paul Sijben tel: +31334566488
Eemvalley Technology fax: +31334557523
the Netherlands http://eemvalley.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.stackless.com/pipermail/stackless/attachments/20070226/97414d45/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