|
Boost Users : |
Subject: [Boost-users] [thread] Error checking mutex
From: Paul Fee (paul.f.fee_at_[hidden])
Date: 2016-08-31 12:37:47
Hi all,
When using pthread mutexes a number of types are available (man
pthread_mutexattr_settype). The normal and recursive types are exposed via
boost as boost::mutex and boost::recursive_mutex. I'd like to use
PTHREAD_MUTEX_ERRORCHECK mutexes but don't see such a mutex type within
boost or C++ std namespaces. I'm wondering why this C feature is not
exposed to C++ users. Are there plans to do so? Has it been omitted
because this POSIX feature is not portable to other platforms?
For experimentation purposes I've duplicated then modified the code from
boost/thread/recursive_mutex.hpp and
boost/thread/pthread/recursive_mutex.hpp to create errorcheck_mutex.hpp on
my Fedora 24 system and it gives me the error checking functionality I'm
after. Is this a reasonable approach to plug the gap in Boost or is there
a reason not to do so?
Thanks,
Paul
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net