mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3684 - revert initialisation order, thread can be eager and needs complete state so it must be inited last
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1243334 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bc8441bebc
commit
5a74d56cc1
|
@ -48,16 +48,18 @@ public class VMTransport implements Transport, Task {
|
|||
protected final URI location;
|
||||
protected final long id;
|
||||
protected LinkedBlockingQueue<Object> messageQueue = new LinkedBlockingQueue<Object>(this.asyncQueueDepth);
|
||||
private TaskRunner taskRunner = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(this, "VMTransport: " + toString());
|
||||
|
||||
private volatile int receiveCounter;
|
||||
|
||||
// Managed Sate access protected by locks.
|
||||
protected final AtomicBoolean stopping = new AtomicBoolean();
|
||||
protected final AtomicBoolean started = new AtomicBoolean();
|
||||
protected final AtomicBoolean starting = new AtomicBoolean();
|
||||
protected final AtomicBoolean disposed = new AtomicBoolean();
|
||||
|
||||
// thread can be eager, so initialisation needs to be last so that partial state is not visible
|
||||
protected TaskRunner taskRunner = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(this, "VMTransport: " + toString());
|
||||
|
||||
private volatile int receiveCounter;
|
||||
|
||||
|
||||
public VMTransport(URI location) {
|
||||
this.location = location;
|
||||
this.id = NEXT_ID.getAndIncrement();
|
||||
|
|
Loading…
Reference in New Issue