[ntcore] Add PubSubOption to disable handle signaling (#8972)

This helps reduce lock contention on Synchronization Signal objects if
the user does not intend to use this signaling path.

Use this option on the RobotBase MultiSubscriber to all topics.
This commit is contained in:
Peter Johnson
2026-06-19 17:17:37 -05:00
committed by GitHub
parent 8d2f3212e7
commit 608f024f82
14 changed files with 130 additions and 13 deletions

View File

@@ -16,6 +16,7 @@ import org.wpilib.math.util.MathSharedStore;
import org.wpilib.networktables.MultiSubscriber;
import org.wpilib.networktables.NetworkTableEvent;
import org.wpilib.networktables.NetworkTableInstance;
import org.wpilib.networktables.PubSubOption;
import org.wpilib.system.RuntimeType;
import org.wpilib.system.Timer;
import org.wpilib.system.WPILibVersion;
@@ -103,7 +104,7 @@ public abstract class RobotBase implements AutoCloseable {
setupCameraServerShared();
setupMathShared();
// subscribe to "" to force persistent values to propagate to local
m_suball = new MultiSubscriber(inst, new String[] {""});
m_suball = new MultiSubscriber(inst, new String[] {""}, PubSubOption.DISABLE_SIGNAL);
if (!isSimulation()) {
inst.startServer("/home/systemcore/networktables.json", "", "robot");
} else {