forked from TrueCloudLab/frostfs-node
65a93af176
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
20 lines
229 B
Go
20 lines
229 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type worker interface {
|
|
Run(context.Context)
|
|
}
|
|
|
|
func startWorkers(c *cfg) {
|
|
for _, wrk := range c.workers {
|
|
c.wg.Add(1)
|
|
|
|
go func(w worker) {
|
|
w.Run(c.ctx)
|
|
c.wg.Done()
|
|
}(wrk)
|
|
}
|
|
}
|