From eb67e5e0a8821058fed782bf9c90b45c793036a5 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 27 Jan 2026 01:16:21 +0900 Subject: internal/pkg: exclusive artifacts This alleviates scheduler overhead when curing many artifacts. Signed-off-by: Ophestra --- internal/pkg/pkg_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/pkg/pkg_test.go') diff --git a/internal/pkg/pkg_test.go b/internal/pkg/pkg_test.go index fe618a6a..d791f107 100644 --- a/internal/pkg/pkg_test.go +++ b/internal/pkg/pkg_test.go @@ -96,12 +96,14 @@ func (a *stubArtifact) Kind() pkg.Kind { return a.kind } func (a *stubArtifact) Params(ctx *pkg.IContext) { ctx.GetHash().Write(a.params) } func (a *stubArtifact) Dependencies() []pkg.Artifact { return a.deps } func (a *stubArtifact) Cure(t *pkg.TContext) error { return a.cure(t) } +func (*stubArtifact) IsExclusive() bool { return false } // A stubArtifactF implements [FloodArtifact] with hardcoded behaviour. type stubArtifactF struct { kind pkg.Kind params []byte deps []pkg.Artifact + excl bool cure func(f *pkg.FContext) error } @@ -110,6 +112,7 @@ func (a *stubArtifactF) Kind() pkg.Kind { return a.kind } func (a *stubArtifactF) Params(ctx *pkg.IContext) { ctx.GetHash().Write(a.params) } func (a *stubArtifactF) Dependencies() []pkg.Artifact { return a.deps } func (a *stubArtifactF) Cure(f *pkg.FContext) error { return a.cure(f) } +func (a *stubArtifactF) IsExclusive() bool { return a.excl } // A stubFile implements [FileArtifact] with hardcoded behaviour. type stubFile struct { -- cgit v1.3.1