return counter++;
}
- protected boolean doRun = true;
+ protected volatile boolean doRun = true;
protected GroupChannel channel;
protected long sleepTime;
public HeartbeatThread(GroupChannel channel, long sleepTime) {
protected long maxQueueSize = 1024*1024*64; //64MB
protected FastQueue queue = new FastQueue();
- protected boolean run = false;
+ protected volatile boolean run = false;
protected Thread msgDispatchThread = null;
protected long currentSize = 0;
protected boolean useDeepClone = true;
protected boolean useThread = false;
protected boolean staticOnly = false;
- protected boolean running = true;
+ protected volatile boolean running = true;
protected PingThread thread = null;
protected static AtomicInteger cnt = new AtomicInteger(0);
/**
* Internal flag used for the listen thread that listens to the multicasting socket.
*/
- protected boolean doRunSender = false;
- protected boolean doRunReceiver = false;
+ protected volatile boolean doRunSender = false;
+ protected volatile boolean doRunReceiver = false;
protected int startLevel = 0;
/**
* Socket that we intend to listen to
}//class SenderThread
protected static class RecoveryThread extends Thread {
- static boolean running = false;
+ static volatile boolean running = false;
McastServiceImpl parent = null;
public RecoveryThread(McastServiceImpl parent) {
this.parent = parent;