Skip to content
Snippets Groups Projects

stf

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by arw
    stuff.go 148 B
    x.RLock()
    if x.ReadStuff() == 123 {
        x.RUnlock()
        ...
        x.Lock() // write lock
        x.WriteStuff()
        x.Unlock()
    } else {
        x.RUnlock()
    }
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment