From 5984f2c2bcfed548e76c65abbcb57688e4e338b3 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Wed, 22 Jun 2022 12:59:26 +0300 Subject: [PATCH] [#525] Add comment to clarify anonymous func Signed-off-by: Denis Kirillov --- api/layer/object.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/layer/object.go b/api/layer/object.go index 67377ef4..17ace4f4 100644 --- a/api/layer/object.go +++ b/api/layer/object.go @@ -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() {