[Stackless] stackless socket, curiouser and curiouser

Paul Sijben sijben at eemvalley.com
Wed Feb 28 11:35:07 CET 2007


on a hunch I changed handle_accept() in stacklesssocket to:

    def handle_connect(self):
        #self.connectChannel.send(None)
        pass

because it expects connect to receive it in
    def connect(self, address):
        asyncore.dispatcher.connect(self, address)
        if not self.connected:
            self.connectChannel.receive()

however a UDP socket is connectionless. At the monment  am happy with
the change. I managed to send/receive my first pair of packets.

I am now debugging what's keeping my code from sending the followup packets

I must say that so far the project of moving my code to stackless is not
as straightforward as I'd hoped. However when I'm done I'll post my
changes to stacklesssocket and the drop-in modules I created.

Oh and the speedup measurements ;-)

Paul

Andrew Dalke wrote:
> On Feb 27, 2007, at 6:33 AM, Paul Sijben wrote:
>> StopIteration: the main tasklet is sending without a receiver available.
>> No packet is sent btw. It does this with s.setblocking(1) and
>> without. I got the error above when I pressed ctrl-C.
>>
>> This is the right way to set up a regular socket, but apparently not
>> a stacklessocket. Did I do something wrong or did I trigger a bug in
>> stacklesssocket?
>
> The main tasklet is special, for reasons I don't understand.  It
> does not let you block it through a channel send.  Try running the
> same code in a tasklet.
>
> That is only a guess .. I haven't tried it out here myself.
>
>                 Andrew
>                 dalke at dalkescientific.com
>

-- 
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



More information about the Stackless mailing list