[issue37754] alter size of segment using multiprocessing.shared_memory

2019-08-17 Thread Davin Potts


Davin Potts  added the comment:

Attempts to alter the size of a shared memory segment are met with a variety of 
different, nuanced behaviors on systems we want to support.  I agree that it 
would be valuable to be able to effectively realloc a shared memory segment, 
which thankfully the user can do with the current implementation although they 
become responsible for adjusting for platform-specific behaviors.  The design 
of the API in multiprocessing.shared_memory strives to be as feature-rich as 
possible while providing consistent behavior across platforms that can be 
reasonably supported; it also leaves the door open (so to speak) for users to 
exploit additional platform-specific capabilities of shared memory segments.

Knowing beforehand whether to create a segment or attach to an existing one is 
an important feature for a variety of use cases.  I believe this is discussed 
at some length in issue35813.  If what is discussed there does not help (it did 
get kind of long sometimes), please say so and we can talk through it more.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37754] alter size of segment using multiprocessing.shared_memory

2019-08-04 Thread Vinay Sharma


New submission from Vinay Sharma :

Hi,
I am opening this to discuss about some possible enhancements in the 
multiprocessing.shared_memory module.

I have recently started using multiprocessing.shared_memory and realised that 
currently the module provides no functionality to alter the size of the shared 
memory segment, plus the process has to know beforehand whether to create a 
segment or open an existing one, unlike shm_open in C, where segment can be 
automatically created if it doesn't exist.


For an end user perspective I believe that these functionalities would be 
really helpful, and I would be happy to contribute, if you believe that they 
are necessary.

I would also like to mention that I agree this might be by design, or because 
of some challenges, in which case it would be very helpful if I can know them.

--
components: Library (Lib)
messages: 348980
nosy: davin, pitrou, vinay0410
priority: normal
severity: normal
status: open
title: alter size of segment using multiprocessing.shared_memory
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com