boostorg / boostorg/interprocess

Using `message_queue` with `windows_shared_memory`

Aperta
#211 0 commenti 4 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
185
Fork
131
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

We're currently using `message_queue` on Windows, but want to avoid files being created on the user's filesystem (even in the application's config/cache directory). Moreover, we'd like to have the semantics of `windows_shared_memory` (mostly the destruction once all handles to the memory are closed).

Currently, `message_queue` uses `shared_memory_object`. Would it be possible for users to specify the underlying abstraction (e.g. `message_queue_t, windows_shared_memory>`)?

I experimented a bit by using `managed_open_or_create_impl`, which worked fine for me (I might have missed some bugs as I don't know IPC too well). One downside is that `message_queue_t::remove` can't be used with `windows_shared_memory`, as it doesn't provide that functionality (the documentation for `~message_queue_t` should be updated, too).

I'd be fine if this was done via a `#define`, but it would be nicer if an approach similar to the previously mentioned could be taken.
If this is something that could get included in the library, I'd be fine with implementing it.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia leggendo message_queue_t e il suo attuale utilizzo di shared_memory_object, quindi confronta managed_open_or_create_impl con windows_shared_memory. Determina come potrebbe essere selezionata l’astrazione di memoria sottostante e come dovrebbero funzionare la semantica della distruzione e quella di message_queue_t::remove; aggiorna la documentazione del distruttore se il design viene accettato.

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

Valutazione

Stack tecnologico
cpp
Ambito
operating-systems
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
28/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.