So,
Channels objey the iterator protocol.  calling channel.close() will raise the 
StopIteration exception from the channel.__next__ method.
But, calling channel.close() from the receiving end will also cause this same 
exception to be raised when someone wants to call channel.send().
Now, I wonder if a more appropriate exception for the send() call wouldn't be 
GeneratorExit()?    This is what the generator yield(foo) statement raises when 
the generator is closed, and it seems logical that this should be the exception 
raised when someone tries to send to a closed channel.

K
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to