[Stackless] must be something simple

lars van Gemerden lars at rational-it.com
Fri May 24 14:03:55 CEST 2013


After some experimentation i think i understand:

If channel.preference == 1, the sender still blocks on send() until the
message is received; only AFTER reception, send() returns immediately, instead
of the receive()?

Is that correct?

Cheers, Lars




On Fri, May 24, 2013 at 11:35 AM, lars van Gemerden <lars at rational-it.com>wrote:

>
> Hi,
>
> I must be mssing something basic; why does the following not print
> anything:
>
> channel = stackless.channel()
> channel.preference = 1
>
> def run(a):
>     print channel.send(a)
>     print channel.receive()
>
> if __name__ == "__main__":
>
>     stackless.tasklet(run)("anything")
>     stackless.run()
>
> If with preference  = 1 the send(..) returns immediately, why doesn't
> "print channel.send(a)" print "None" or something and why is 'a' never
> received?
>
> Cheers, Lars
>
>
>
> ====================================
> Lars van Gemerden
> lars at rational-it.com
> +31 6 26 88 55 39
> ====================================
>



-- 
====================================
Lars van Gemerden
lars at rational-it.com
+31 6 26 88 55 39
====================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20130524/0d0c14fc/attachment.html>


More information about the Stackless mailing list