Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • pygolang pygolang
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedinexedi
  • pygolangpygolang
  • Repository
  • pygolang
  • golang
  • sync.cpp
Find file BlameHistoryPermalink
  • Kirill Smelkov's avatar
    sync.RWMutex: Teach it to downgrade from write-locked into read-locked state · a9345a98
    Kirill Smelkov authored Feb 20, 2020
    Go version does not provide this, but the topic of sync.RWMutex
    downgrading was raised up several times, at least
    
    	https://github.com/golang/go/issues/4026
    	https://github.com/golang/go/issues/23513
    	https://groups.google.com/forum/#!topic/golang-nuts/MmIDUzl8HA0
    	...
    
    Atomic downgrading is often useful to avoid race window in between
    Unlock and RLock and, as consequence, having the need to recheck things
    after RLock.
    
    We can put this complexity and logic into well-defined RWMutex primitive
    instead of throwing it to be solved by every RWMutex user.
    a9345a98
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7