Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pygolang
pygolang
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • nexedi
  • pygolangpygolang
  • Repository

Switch branch/tag
  • pygolang
  • golang
  • sync.h
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
sync.h 6.86 KB
EditWeb IDE

Replace sync.h

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备14008524号