412940 minor threadsafe fixes
This commit is contained in:
parent
5d3760b17d
commit
cbc0a114f4
|
@ -267,6 +267,8 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
|
||||||
|
|
||||||
|
|
||||||
protected void interruptAcceptors()
|
protected void interruptAcceptors()
|
||||||
|
{
|
||||||
|
synchronized (this)
|
||||||
{
|
{
|
||||||
for (Thread thread : _acceptors)
|
for (Thread thread : _acceptors)
|
||||||
{
|
{
|
||||||
|
@ -274,6 +276,7 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
|
||||||
thread.interrupt();
|
thread.interrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Future<Void> shutdown()
|
public Future<Void> shutdown()
|
||||||
|
@ -305,11 +308,14 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
|
||||||
}
|
}
|
||||||
|
|
||||||
public void join(long timeout) throws InterruptedException
|
public void join(long timeout) throws InterruptedException
|
||||||
|
{
|
||||||
|
synchronized (this)
|
||||||
{
|
{
|
||||||
for (Thread thread : _acceptors)
|
for (Thread thread : _acceptors)
|
||||||
if (thread != null)
|
if (thread != null)
|
||||||
thread.join(timeout);
|
thread.join(timeout);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract void accept(int acceptorID) throws IOException, InterruptedException;
|
protected abstract void accept(int acceptorID) throws IOException, InterruptedException;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue