title: goroutine in a loop with a channel
body: <p><img src="https://i.stack.imgur.com/h5LMZ.png" alt="enter image description here"></p>
  
  <p>Note: <code>GetTaskQueue()</code> returns a global variable which struct is </p>
  
  <pre><code>type TaskQueue struct {
      ch   chan int
      wg   *sync.WaitGroup
  }
  </code></pre>
  
  <p>The channel is used to limit the number of goroutines, and the max number of goroutines is set to be 3.</p>
  
  <p>My expectation is that all <code>t</code>s should match the <code>task</code>s. However, <code>Dominium</code> and <code>dApp Builder</code> did not show in <code>t</code>, while <code>EthicHub Twitter</code> and <code>Apollo</code> duplicated.</p>
  
  <p>The output is shown below.</p>
  
  <p><img src="https://i.stack.imgur.com/4K8BI.png" alt="enter image description here"></p>