Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pygolang pygolang
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • pygolangpygolang
  • Repository

Switch branch/tag
  • pygolang
  • golang
  • _sync.pxd
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.pxd 2.43 KB
EditWeb IDE

Replace _sync.pxd

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备2021021310号-2 | 沪ICP备2021021310号-7