373272: maintain the start order of aggregate beans when adding a thread pool
This commit is contained in:
parent
01ffa7cc48
commit
de8a1b3fe4
|
@ -80,6 +80,15 @@ public class SelectChannelConnector extends AbstractNIOConnector
|
|||
setAcceptors(Math.max(1,(Runtime.getRuntime().availableProcessors()+3)/4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setThreadPool(ThreadPool pool)
|
||||
{
|
||||
super.setThreadPool(pool);
|
||||
// preserve start order
|
||||
removeBean(_manager);
|
||||
addBean(_manager,true);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
@Override
|
||||
public void accept(int acceptorID) throws IOException
|
||||
|
|
|
@ -39,6 +39,11 @@ public class AggregateLifeCycle extends AbstractLifeCycle implements Destroyable
|
|||
}
|
||||
final Object _bean;
|
||||
volatile boolean _managed=true;
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return "{"+_bean+","+_managed+"}";
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
Loading…
Reference in New Issue