Opened 10 years ago

Last modified 10 years ago

#7027 new Patches

interprocess: Message queue using Windows shared memory

Reported by: frank.richter@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.50.0 Severity: Problem
Keywords: Cc:

Description

interprocess::message_queue currently always uses the shared_memory_object implementation. However, on Windows it can be desireable to have a message queue backed by windows_shared_memory instead. These patches add support for this.

  • The first patch generalizes message_queue_t<>; the message queue logic is moved into message_queue_base_t<>, and the actual storage backend handling is delegated to a derived class. message_queue_t<> is changed to be based on message_queue_base_t<> and to provide storage in a shared_memory_object.
  • The second patch adds the windows_message_queue<> class which backs the storage with a windows_shared_memory. A variant of the message queue test is also added.

Attachments (2)

boost-message-queue-customize.diff (21.4 KB ) - added by frank.richter@… 10 years ago.
interprocess: message queue generalization to support different storages
boost-windows-message-queue.diff (14.8 KB ) - added by frank.richter@… 10 years ago.
interprocess: message queue using windows_shared_memory

Download all attachments as: .zip

Change History (4)

by frank.richter@…, 10 years ago

interprocess: message queue generalization to support different storages

by frank.richter@…, 10 years ago

interprocess: message queue using windows_shared_memory

comment:1 by josuegomes@…, 10 years ago

Unfortunately this doesn't give any big performance improvement. Please see http://stackoverflow.com/questions/6212138/boostinterprocess-message-queue-performance-rather-slow.

in reply to:  1 comment:2 by frank.richter@…, 10 years ago

Replying to josuegomes@…:

Unfortunately this doesn't give any big performance improvement

Performance wasn't the motivation; it was to avoid the emulation of POSIX semantics that is performed Boost.Interprocess shared memory on Windows (when not using native shared memory).

Note: See TracTickets for help on using tickets.