Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunConcurrent ¶ added in v0.6.1
RunConcurrent runs every task in its own goroutine, acquiring one slot per task before spawning it, so no more than sem's capacity is in flight. The first error cancels the context handed to the remaining tasks; the first error raised is the one returned. A failed acquire stops scheduling but never abandons tasks already in flight.
func RunConcurrentLimit ¶ added in v0.6.1
RunConcurrentLimit is RunConcurrent with a budget no other call shares: it mints a semaphore of capacity limit for this call alone. A non-positive limit runs unbounded, matching errgroup's SetLimit.
Types ¶
Click to show internal directories.
Click to hide internal directories.