In stackless python, is data sent over a channel immutable?
I have a typical producer, consumer pattern. If the producer sends an object over a channel, the producer is blocked until the consumer accepts the object. After the consumer accepts the object, the producer alters the object in some way. Does the consumer see the object get altered? Or was there an implici开发者_Go百科t copy when sending the data over the channel?
Stackless sends a reference to the python object over the channel, so any changes the producer makes to the object will be "seen" by the consumer. No copying going on.
精彩评论