Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
type S ¶
type S struct {
// contains filtered or unexported fields
}
S is a concurrency limiter. Holders of a resource unit (represented by *Item) also get temporary ownership of a memory buffer. TODO: Consider implementing some ordering or prioritization. For example, while copying many files in multiple chunks each, maybe we prefer to use available concurrency to complete all the chunks of one file rather than a couple of chunks of many, so that if there's an error we have made some useful progress.
func New ¶
New constructs S. Total possible buffer allocation is capacity*bufSize, but it's allocated lazily per-Item.
Click to show internal directories.
Click to hide internal directories.