GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — SharedMemory.unlink() can fail if called during interpreter shutdown · Issue #91577 · python/cpython Closed Labels topic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Description
For example when working with SharedMemory as the buffer for a numpy array it is useful to create a wrapper object to ensure that clean up is done with the object is deleted. #import numpy as np from multiprocessing import shared_memory class ShArray: def __init__(self): self.shared_memory = shared_memory.SharedMemory(create=True, size=400) #self.array = np.ndarray((10,10), dtype="i4", buffer=self.shared_memory.buf) def __del__(self): self.shared_memory.close() self.shared_memory.unlink() a1 = ShArray() (Commented lines show my typical usage, but are not need to demonstrate the issue) This happens on 3.8 and current main, both on Linux x86-64. Patch to follow Activity
MetadataMetadataAssigneesLabelstopic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |