]> git.hungrycats.org Git - bees/commitdiff
bees-config-v1: trim [thread] comments to option reference
authorZygo Blaxell <bees@furryterror.org>
Tue, 9 Jun 2026 00:00:09 +0000 (20:00 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sat, 5 Sep 2026 04:03:58 +0000 (00:03 -0400)
The built-in [thread] block header and the thread-max comment had grown
to carry expression examples, the "cap a CPU-relative count yourself"
usage tip, and the legacy -c oversubscription tradeoff.  All of this is
already documented at length in docs/config-file.md, leaving two copies
to drift.

Trim both back to the file's own stated policy (semantics, accepted
values, defaults, direct effects) and point to the doc for the rest.

Assisted-by: Claude-Code:claude-opus-4-8
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees-config-v1.cc

index af1605fa72522f889625cddb7649271da1ed386c..6bc261da0fd7d46d6970f277c69cdf6b09f04edf 100644 (file)
@@ -21,9 +21,8 @@ static const char bees_config_v1[] = R"--v1-config--(
 
 # The [thread] section controls worker count and loadavg throttling.
 # thread-min, thread-max, and loadavg-target accept size-style expressions
-# (the same grammar as state.hash.size) with the ${NPROC} (logical CPU count)
-# and ${THREAD_FACTOR} (the thread-factor value below) substitutions, e.g.
-# "${NPROC} * 2" or "min(8, ${NPROC})".
+# (same grammar as state.hash.size) with ${NPROC} and ${THREAD_FACTOR}
+# substitutions.  See docs/config-file.md for examples.
 
 [thread]
 
@@ -32,10 +31,9 @@ static const char bees_config_v1[] = R"--v1-config--(
         thread-min = 0
 
         # Maximum number of threads to run.  Expression; ${NPROC} and
-        # ${THREAD_FACTOR} allowed.  The value means exactly what it evaluates
-        # to; to cap a CPU-relative count, write the min() yourself.  The
-        # legacy -c option overrides this with an exact integer count
-        # (oversubscription allowed; thread-factor then has no effect).
+        # ${THREAD_FACTOR} allowed.  Means exactly what it evaluates to;
+        # legacy -c overrides with an exact integer count.
+        # See docs/config-file.md for capping and oversubscription notes.
         thread-max = max(1, ceil(${NPROC} * ${THREAD_FACTOR}))
 
         # Ratio of bees threads to CPU threads (legacy -C option), exposed to