Gareth Rees added the comment:
If you need the 2.7 behaviour (anonymous mappings) in 3.5 then you can still do
it, with some effort. I think the approach that requires the smallest amount of
work would be to ensure that subprocesses are started using fork(), by calling
multiprocessing.set_start_method('fork'), and then monkey-patch
multiprocessing.heap.Arena.__init__ so that it creates anonymous mappings using
mmap.mmap(-1, size).
(I suggested above that Python could be modified to create anonymous mappings
in the 'fork' case, but now that I look at the code in detail, I see that it
would be tricky, because the Arena class has no idea about the Context in which
it is going to be used -- at the moment you can create one shared object and
then pass it to subprocesses under different Contexts, so the shared objects
have to support the lowest common denominator.)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30919>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com