Add the Discard option to both.SizedGroup and ErrSizedGroup. With this option, when the group is "locked" (i.e., over-capacity), any invocation of Go will be silently discarded until the group is unlocked (i.e., under-capacity). This allows for more efficient concurrency handling in scenarios where it's acceptable to skip the execution of additional goroutines when the group has reached its maximum capacity.
Add the
Discard
option to both.SizedGroup
andErrSizedGroup
. With this option, when the group is "locked" (i.e., over-capacity), any invocation of Go will be silently discarded until the group is unlocked (i.e., under-capacity). This allows for more efficient concurrency handling in scenarios where it's acceptable to skip the execution of additional goroutines when the group has reached its maximum capacity.