mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
[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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user