Closed cavaliercoder closed 5 years ago
It works. however, when transfer buffer size get larger, it would be still hard to control the data flow rate accurately and smoothly by waiting.
In my previous experiences using a signal channel would work much ideally when we are doing batch download and sharing threshold to all goroutines:
Some transfers, such as HTTPS have a consistently small chunk size (e.g. 16kb). Since these do not fill the default transfer buffer (32kb) on each read, the rate limiter becomes overly aggressive, limiting each read as though it would read 32kb.