Update dependencies

This commit is contained in:
bluepython508
2025-04-09 01:00:12 +01:00
parent f0641ffd6e
commit 5a9cfc022c
882 changed files with 68930 additions and 24201 deletions

24
vendor/tailscale.com/syncs/shardvalue_tailscale.go generated vendored Normal file
View File

@@ -0,0 +1,24 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
// TODO(raggi): update build tag after toolchain update
//go:build tailscale_go
package syncs
import (
"runtime"
)
//lint:ignore U1000 unused under tailscale_go builds.
type shardValuePool struct{}
// NewShardValue constructs a new ShardValue[T] with a shard per CPU.
func NewShardValue[T any]() *ShardValue[T] {
return &ShardValue[T]{shards: make([]T, runtime.NumCPU())}
}
// One yields a pointer to a single shard value with best-effort P-locality.
func (sp *ShardValue[T]) One(f func(*T)) {
f(&sp.shards[runtime.TailscaleCurrentP()%len(sp.shards)])
}