diff options
| author | Xe Iaso <me@xeiaso.net> | 2025-04-23 23:48:16 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2025-04-23 23:48:16 -0400 |
| commit | 3d0a5c2d8791764f15cd41459696722c22bcd312 (patch) | |
| tree | a92f1f27a162b7c2f945f12a07643ae5a1c023f7 /lib/anubis.go | |
| parent | ea321b7f13e59120a9995284ee0d1f9c7498c06b (diff) | |
| download | anubis-wasm.tar.xz anubis-wasm.zip | |
feat(lib): limit concurrency of wasm-based verifierswasm
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lib/anubis.go')
| -rw-r--r-- | lib/anubis.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/anubis.go b/lib/anubis.go index 762c6aa..269df5d 100644 --- a/lib/anubis.go +++ b/lib/anubis.go @@ -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() |
