life is better without race condition

This commit is contained in:
rusefillc 2022-08-09 12:03:49 -04:00
parent 27059fd4cc
commit db7245f90b
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,7 @@ public class PCanIoStream extends AbstractIoStream {
static Logging log = getLogging(PCanIoStream.class); static Logging log = getLogging(PCanIoStream.class);
public static final TPCANHandle CHANNEL = TPCANHandle.PCAN_USBBUS1; public static final TPCANHandle CHANNEL = TPCANHandle.PCAN_USBBUS1;
private final IncomingDataBuffer dataBuffer = createDataBuffer("[PCAN] "); private final IncomingDataBuffer dataBuffer;
private final PCANBasic can; private final PCANBasic can;
private final StatusConsumer statusListener; private final StatusConsumer statusListener;
@ -89,6 +89,7 @@ public class PCanIoStream extends AbstractIoStream {
private PCanIoStream(PCANBasic can, StatusConsumer statusListener) { private PCanIoStream(PCANBasic can, StatusConsumer statusListener) {
this.can = can; this.can = can;
this.statusListener = statusListener; this.statusListener = statusListener;
dataBuffer = createDataBuffer("[PCAN] ");
} }
@Override @Override