Skip to content

Commit 4cffb15

Browse files
committed
move mutex
1 parent fc7703e commit 4cffb15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wasp/wasp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,13 @@ func (g *Generator) runExecuteLoop() {
378378
g.currentSegmentMu.Unlock()
379379
// we start all vus once
380380
vus := g.stats.CurrentVUs.Load()
381-
g.vusMu.Lock()
382381
for i := 0; i < int(vus); i++ {
383382
inst := g.vu.Clone(g)
384383
g.runVU(inst)
384+
g.vusMu.Lock()
385385
g.vus = append(g.vus, inst)
386+
g.vusMu.Unlock()
386387
}
387-
g.vusMu.Unlock()
388388
}
389389
}
390390

0 commit comments

Comments
 (0)