Skip to content

Instantly share code, notes, and snippets.

func Inserter() {
defer wg.Done()
for {
next := atomic.AddInt32(&next, 1)
if next > int32(*Requests) {
break
}
i := int(next - 1)
requests[i].size = rand.Intn(*MaxSize-*MinSize) + *MinSize
pass := data[0:requests[i].size]