[#525] Add comment to clarify anonymous func

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-06-22 12:59:26 +03:00 committed by Alex Vanin
parent ad95d1745c
commit 5984f2c2bc

View file

@ -505,6 +505,8 @@ func (n *layer) initWorkerPool(ctx context.Context, size int, p allObjectParams,
default:
}
// We have to make a copy of pointer to data.NodeVersion
// to get correct value in submitted task function.
func(node *data.NodeVersion) {
wg.Add(1)
err = pool.Submit(func() {