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

Stephan Houben stephanh42 at gmail.com.invalid
Tue Sep 12 04:50:46 EDT 2017


Op 2017-09-12, gerlando.falauto at gmail.com schreef <gerlando.falauto at gmail.com>:

> Notice however how I'd have to create those Arrays dynamically in the
> producer thread. Would I then be able to pass them to the consumer by
> putting a reference in a queue? 

Yes.

> I wouldn't want them to be pickled at all in that case, of course.

Essentially only an address pointing into a piece of shared memory is
pickled and transmitted then.

> Also, why do you say it only works on Unix? I couldn't find any
> reference to such limitation in the documentation.

There is no such limitation.
It's supposed to work on all platforms (including Windows).

Stephan



More information about the Python-list mailing list