Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Hockin (0.16 sec)

  1. doc/go_mem.html

    	g()
    }
    </pre>
    
    <p>
    it can happen that <code>g</code> prints <code>2</code> and then <code>0</code>.
    </p>
    
    <p>
    This fact invalidates a few common idioms.
    </p>
    
    <p>
    Double-checked locking is an attempt to avoid the overhead of synchronization.
    For example, the <code>twoprint</code> program might be
    incorrectly written as:
    </p>
    
    <pre>
    var a string
    var done bool
    
    func setup() {
    HTML
    - Registered: Tue Apr 16 11:13:10 GMT 2024
    - Last Modified: Mon Mar 04 15:54:42 GMT 2024
    - 26.6K bytes
    - Viewed (0)
Back to top