Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for loop (0.12 sec)

  1. doc/go_mem.html

    </p>
    
    <p>
    Not introducing data races also means not assuming that loops terminate.
    For example, a compiler must in general not move the accesses to <code>*p</code> or <code>*q</code>
    ahead of the loop in this program:
    </p>
    
    <pre>
    n := 0
    for e := list; e != nil; e = e.next {
    	n++
    }
    i := *p
    *q = 1
    </pre>
    
    <p>
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Mon Mar 04 15:54:42 GMT 2024
    - 26.6K bytes
    - Viewed (0)
Back to top