feat(lib): limit concurrency of wasm-based verifiers

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-04-23 23:48:16 -04:00
parent ea321b7f13
commit 3d0a5c2d87
2 changed files with 27 additions and 1 deletions

View File

@@ -152,7 +152,11 @@ func New(opts Options) (*Server, error) {
return nil, fmt.Errorf("can't load static/wasm/%s: %w", finfo.Name(), err)
}
result.validators[name] = runner
var concurrentLimit int64 = 4
cv := NewConcurrentVerifier(runner, concurrentLimit)
result.validators[name] = cv
}
mux := http.NewServeMux()