Standard library / sync
sync.RWMutex.RUnlock()
Release one acquired read lock. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (rw *RWMutex) RUnlock()Working Example
Example Snippetgo
package main
import ( "fmt" "sync")
func main() { var m sync.RWMutex m.RLock() m.RUnlock() ok := m.TryLock() fmt.Println(ok) if ok { m.Unlock() }}