controls = (ThreadControl[])collection.
toArray( new ThreadControl[ collection.size() ] );
}
for( int i = 0; i < controls.length; i++ )
{
final ThreadControl control = controls[ i ];
if( !control.isFinished() )
{
control.interrupt();
}
}
super.shutdown( timeout );
for( int i = 0; i < controls.length; i++ )
{
final ThreadControl control = controls[ i ];
if( !control.isFinished() )
{
try
{
control.join( timeout );
}
catch( final InterruptedException ie )
{
//Ignore
}