multiprocessing.managers. SharedMemoryManager should let you name the created object

Aperta
#101,014 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia con multiprocessing.managers.SharedMemoryManager e con la documentazione di multiprocessing.shared_memory collegata nell’issue. Esamina le PR collegati gh-102170 e gh-102171, quindi verifica che gli oggetti creati dal manager supportino il comportamento name= richiesto per i processi che devono accedervi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

3.13 topic-multiprocessing type-feature

Python's new truly-shared memory (https://docs.python.org/3/library/multiprocessing.shared_memory.html) is great, however using the SharedMemoryManager is impractical since the created list or numpy array can't be custom-named.

Why would we want to custom-name?

Well, say process 3 creates a new object and process 5 wants to access it. Without a shared naming protocol, this isn't possible. Process 3 has to read the name for its newly created object and somehow signal it to process 5 in order for process 5 to ever know about it and access it.

We should be able to name the objects created with the SharedMemoryManager, with the name= parameter, same as the syntax for creating those objects without the manager.

Thanks,
Sam

Linked PRs
  • gh-102170
  • gh-102171
Lingua principale
Python
Stelle
77.2k
Fork
36k
Merge medio
1g 9h
PR unite (30g)
558

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python/cpython

Tutte le issue di python/cpython

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.