gopcp / example.v2

An example project for book 'Go Programming & Concurrency in Practice, 2nd edition' (《Go并发编程实战》第2版).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

关于loadgen中并发的计数方式的疑问

wangjinbei opened this issue · comments

书中,loadgen的并发设计是根据过期时间/时间间隔的方式~
想请问:为何不直接使用for循环concurrency次+timeout的形式来处理呢?这样不是免去了tick的使用?

过期时间+时间间隔的方式更容易控制吞吐量。