修复全量测试竞态并更新审查夹具,保存证书覆盖调整前基线

This commit is contained in:
xuans committed 2026-09-20 01:25:34 +08:00
1 parent 78dfcde5e1
commit 2aac6dd9be
15 files changed
+146 -158

No files matched your search

@@ -0,0 +1,18 @@
// Package passwordcapacity 管理所有密码计算入口共享的并发名额。
package passwordcapacity
import "errors"
var ErrBusy = errors.New("password computation is busy")
var computationSlot = make(chan struct{}, 1)
// Acquire 满载时立即拒绝,不积压等待请求;调用方必须延迟释放名额。
func Acquire() (func(), error) {
select {
case computationSlot <- struct{}{}:
return func() { <-computationSlot }, nil
default:
return nil, ErrBusy
}
}