Re: [Boost-bugs] [Boost C++ Libraries] #11798: Implementation of boost::shared_mutex on POSIX is suboptimal

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11798: Implementation of boost::shared_mutex on POSIX is suboptimal
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-11-17 08:10:21


#11798: Implementation of boost::shared_mutex on POSIX is suboptimal
-------------------------+-------------------------------------------------
  Reporter: alex@… | Owner: viboes
      Type: Tasks | Status: assigned
 Milestone: To Be | Component: thread
  Determined | Severity: Optimization
   Version: Boost | Keywords: pthread shared_mutex performance
  1.59.0 | concurrency spinlock
Resolution: |
-------------------------+-------------------------------------------------

Comment (by alex@…):

 A very initial patch is below. Notably, it's lacking a couple things that
 will prevent this to be production-ready:

 1. Doesn't implement the timeout-based locking public methods. This should
 be relatively straightforward using pthread_rwlock_timedrdlock(3) and
 pthread_rwlock_timedwrlock(3).
 2. Doesn't implement any of the upgrade methods. This will be somewhat
 more convoluted, but perhaps we can leverage the existing boost::mutex to
 implement those upgrades atomically.
 3. I'm unclear how this would interact with thread interruption. Have not
 looked into this enough to have insights at this moment.

 Also, as for code style wrt per-platform ifdefs, exceptions (this patch
 throws if the pthread_* methods fail, which is unexpected), etc, I'm open
 to pointers so that I can polish the patch.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11798#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC