Author sbt
Recipients mrjbq7, neologix, pitrou, sbt
Date 2013-03-27.19:01:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <5153420D.4040103@gmail.com>
In-reply-to <1364406446.23.0.751253038666.issue17560@psf.upfronthosting.co.za>
Content
On 27/03/2013 5:47pm, Charles-Fran├žois Natali wrote:
>> multiprocessing currently only allows sharing of such shared arrays
>> using inheritance.
>
> You mean through fork() COW?

Through fork, yes, but "shared" rather than "copy-on-write".

>>   Perhaps we need a picklable mmap type which can be sent over pipes
>> and queues.  (On Unix this would probably require fd passing.)
>
> If you use POSIX semaphores, you could pass the semaphore path and use
> sem_open in the other process (but that would mean you can't unlink it
> right after open).

I assume you mean "shared memory" and shm_open(), not "semaphores" and 
sem_open().  I don't think shm_open() really has any advantages over 
using mmaps backed by "proper" files (since posix shared memeory uses up 
space in /dev/shm which is limited).

By using fd passing you can get the operating system to do ref counting 
on the mmaps and not worry about when to unlink.
History
Date User Action Args
2013-03-27 19:01:46sbtsetrecipients: + sbt, pitrou, mrjbq7, neologix
2013-03-27 19:01:46sbtlinkissue17560 messages
2013-03-27 19:01:46sbtcreate