MCPcopy Create free account
hub / github.com/corestoreio/pkg / IterateParallel

Method IterateParallel

sql/dml/dbr.go:1033–1070  ·  view source on GitHub ↗

IterateParallel starts a number of workers as defined by variable concurrencyLevel and executes the query. Each database row gets evenly distributed to the workers. The callback function gets called within a worker. concurrencyLevel should be the number of CPUs. You should use this function when you

(ctx context.Context, concurrencyLevel int, callBack func(*ColumnMap) error, args ...any)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls 6

queryMethod · 0.95
StringMethod · 0.65
ErrorfMethod · 0.65
DebugMethod · 0.45
ErrMethod · 0.45

Tested by 1