From 6a3b09a507aca0498845d9118a21a82bb5054301 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 10 Nov 2025 07:29:48 +0100 Subject: [chore] update dependencies (#4547) - codeberg.org/gruf/go-ffmpreg: v0.6.12 -> v0.6.14 - github.com/ncruces/go-sqlite3: v0.30.0 -> v0.30.1 - github.com/wazero/wazero: v1.9.0 -> v1.10.0 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4547 Co-authored-by: kim Co-committed-by: kim --- .../wazero/experimental/compilationworkers.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 vendor/github.com/tetratelabs/wazero/experimental/compilationworkers.go (limited to 'vendor/github.com/tetratelabs/wazero/experimental/compilationworkers.go') diff --git a/vendor/github.com/tetratelabs/wazero/experimental/compilationworkers.go b/vendor/github.com/tetratelabs/wazero/experimental/compilationworkers.go new file mode 100644 index 000000000..bb76e01d3 --- /dev/null +++ b/vendor/github.com/tetratelabs/wazero/experimental/compilationworkers.go @@ -0,0 +1,19 @@ +package experimental + +import ( + "context" + + "github.com/tetratelabs/wazero/internal/expctxkeys" +) + +// WithCompilationWorkers sets the desired number of compilation workers. +func WithCompilationWorkers(ctx context.Context, workers int) context.Context { + return context.WithValue(ctx, expctxkeys.CompilationWorkers{}, workers) +} + +// GetCompilationWorkers returns the desired number of compilation workers. +// The minimum value returned is 1. +func GetCompilationWorkers(ctx context.Context) int { + workers, _ := ctx.Value(expctxkeys.CompilationWorkers{}).(int) + return max(workers, 1) +} -- cgit v1.2.3