User Tools

Site Tools


go:concurrency:select

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
go:concurrency:select [2026/01/30 23:13] – [Ignoring the result of append-like behavior] phong2018go:concurrency:select [2026/01/30 23:14] (current) – [Using len(ch) to decide send/receive] phong2018
Line 134: Line 134:
 This is unsafe: This is unsafe:
  
-<code go> if len(ch) < cap(ch) { ch <- v // race condition } </code>+<code text 
 +if len(ch) < cap(ch) {  
 +   ch <- v // race condition.  
 + 
 +</code>
  
 📌 race condition /reɪs kənˈdɪʃ.ən/ 📌 race condition /reɪs kənˈdɪʃ.ən/
go/concurrency/select.1769814838.txt.gz · Last modified: by phong2018