Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Franke (0.15 sec)

  1. doc/go_mem.html

    goroutines coordinate using the <code>limit</code> channel to ensure
    that at most three are running work functions at a time.
    </p>
    
    <pre>
    var limit = make(chan int, 3)
    
    func main() {
    	for _, w := range work {
    		go func(w func()) {
    			limit &lt;- 1
    			w()
    			&lt;-limit
    		}(w)
    	}
    	select{}
    }
    </pre>
    
    <h3 id="locks">Locks</h3>
    
    <p>
    HTML
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 15:54:42 GMT 2024
    - 26.6K bytes
    - Viewed (0)
Back to top