Review round 1: the decoder type ships before any composer can emit it, so a routine SDK bump never sends yields to an engine that refuses them; the composer half moves to a later change. Every yielding process of a node goes into one top-level slice, meshyield.slice, so the three build modules share one quota instead of taking one each; the share is one node value, node-tools' build-cpu-share, and each step's threads divide it by every build slot of the node (words from the composer, a conservative fallback without them).
16 lines
585 B
Go
16 lines
585 B
Go
package buildstep
|
|
|
|
import (
|
|
"os"
|
|
|
|
"git.novox.be/novox/mesh-sdk/go/buildcpu"
|
|
)
|
|
|
|
// NodeLimits is what one step of a build module is held to (novox/hq ADR 0553 §4): the node's processor share and every
|
|
// build slot of the node, from the words the composer gives the module (buildcpu.ShareWord, buildcpu.SlotsWord), and the
|
|
// machine's processors. A module told neither assumes every build seat beside it at its own capacity, own, so its steps
|
|
// stay within the default share with the others'.
|
|
func NodeLimits(own int) buildcpu.Limits {
|
|
return buildcpu.FromWords(os.Getenv, own)
|
|
}
|