boostorg / boostorg/interprocess

Using `message_queue` with `windows_shared_memory`

Abierto
#211 0 comentarios 4 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
185
Forks
131
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza leyendo message_queue_t y su uso actual de shared_memory_object; después compara managed_open_or_create_impl con windows_shared_memory. Determina cómo podría seleccionarse la abstracción de memoria subyacente y cómo deberían funcionar la semántica de destrucción y la de message_queue_t::remove; actualiza la documentación del destructor si se acepta el diseño.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
cpp
Área
operating-systems
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
28/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.