Skip to content

named_mutex posix should change semaphore to robust pthread_mutex #74

Closed

Description

@363568233

current default implementation use BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION macro,
#include <boost/interprocess/sync/shm/named_mutex.hpp> may deadlock when ower dead
#include <boost/interprocess/sync/posix/named_mutex.hpp> is the posix semaphore, it may also deadlock when ower dead.
why not change the named_mutx.hpp to mutex.hpp? using robust pthread_mutex
I see interprocess_mutex have been robust

Activity

  1. igaztanaga commented on Aug 21, 2021

    @igaztanaga
    Member

    pthread mutexes are anonymous resources, not named ones. Recent commits have activated robust mutexes in interprocess_mutex and interprocess_recursive_mutex in platforms that support it. Using named semaphores for named mutexes is also used in other runtimes like APR (Apache Portable Runtime) so no plans to change this in Interprocess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions