Use multiprocessing.shared_memory instead of posixshmem
Since Python 3.8, the stdlib has multiprocessing.shared_memory
which does basically the same as posixshmem
.
It's not better than posixshmem
, but it's one less dependency to pull in.
There are some small differences in the API; the multiprocessing
one thinks more in terms of whether files exist (and whether to create them) rather than whether to rw
; see the small diff for some exception handling.
I plan to add some more tests.