Message185366
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. |
|
| Date |
User |
Action |
Args |
| 2013-03-27 19:01:46 | sbt | set | recipients:
+ sbt, pitrou, mrjbq7, neologix |
| 2013-03-27 19:01:46 | sbt | link | issue17560 messages |
| 2013-03-27 19:01:46 | sbt | create | |
|