412940 minor threadsafe fixes
This commit is contained in:
parent
5d3760b17d
commit
cbc0a114f4
|
@ -268,10 +268,13 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
|
|||
|
||||
protected void interruptAcceptors()
|
||||
{
|
||||
for (Thread thread : _acceptors)
|
||||
synchronized (this)
|
||||
{
|
||||
if (thread != null)
|
||||
thread.interrupt();
|
||||
for (Thread thread : _acceptors)
|
||||
{
|
||||
if (thread != null)
|
||||
thread.interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,9 +309,12 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
|
|||
|
||||
public void join(long timeout) throws InterruptedException
|
||||
{
|
||||
for (Thread thread : _acceptors)
|
||||
if (thread != null)
|
||||
thread.join(timeout);
|
||||
synchronized (this)
|
||||
{
|
||||
for (Thread thread : _acceptors)
|
||||
if (thread != null)
|
||||
thread.join(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void accept(int acceptorID) throws IOException, InterruptedException;
|
||||
|
|
Loading…
Reference in New Issue