[Stackless] stackless socket, curiouser and curiouser
Jeff Senn
senn at maya.com
Mon Feb 26 14:47:19 CET 2007
Or... it might tell you that your 'receive' is being called
multiple times... and (correctly) "blocking" each time...
perhaps from different tasklets or threads?
It's hard to tell without a complete example...
-Jas
On Feb 26, 2007, at 7:30 AM, Paul Sijben wrote:
> 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
> _______________________________________________
> 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