array.array()'s memory shared with multiprocessing.Process()

Terry Reedy tjreedy at udel.edu
Sun Sep 10 23:44:44 EDT 2017


On 9/10/2017 5:05 PM, iurly wrote:
> Il giorno domenica 10 settembre 2017 18:53:33 UTC+2, MRAB ha scritto:

>> I've had a quick look at the source code.
>>
>> When an object is put into the queue, it's actually put into an internal
>> buffer (a deque), and then the method returns.
>>
>> An internal thread works through the buffer and pickles the objects.
>>
>> Therefore, just because the method has returned, it doesn't mean that
>> it's now safe to modify the object.
> 
> I see. So that explains everything. However, I wonder if that's the intended behavior and/or that should be documented somehow.

We are still improving the docs.  Reread the docs and if you think 
something is needed, open an issue, preferably the the new wording you 
would like.

-- 
Terry Jan Reedy




More information about the Python-list mailing list