mil.dod.th.ose.core.integration/src/mil/dod/th/ose/core/integration/TestManagedExecutors.java
public final void testMultiShutdown()
    {
        ExecutorService es = m_ManagedExecutors.newCachedThreadPool();
        
        es.execute(new Runnable()
        {           
            @Override
            public void run()
            {
                try
                {
                    Thread.sleep(2000);
                }
                catch (InterruptedException e)
                {
                    e.printStackTrace();
                }
            }
        });
        
        // shutdown service directly
        es.shutdownNow();
        
        // now shutdown indirectly using managed service
        m_ManagedExecutors.shutdownAllExecutorServicesNow();
    }
/*
     * Verify that an executor service that has already been shutdown doesn't affect the managed executor shutting all 
     * down.
     */
Verify that an executor service that has already been shutdown doesn't affect the managed executor shutting all
down.
Verify that an executor service that has already been shutdown doesn ' t affect the managed executor shutting all down .
public final void testMultiShutdown()
    {
        ExecutorService es = m_ManagedExecutors.newCachedThreadPool();
        es.execute(new Runnable()
        {           
            @Override
            public void run()
            {
                try
                {
                    Thread.sleep(2000);
                }
                catch (InterruptedException e)
                {
                    e.printStackTrace();
                }
            }
        });
        es.shutdownNow();
        m_ManagedExecutors.shutdownAllExecutorServicesNow();
    }
public final void testMultiShutdown ( ) { ExecutorService es = m_ManagedExecutors . newCachedThreadPool ( ) ; es . execute ( new Runnable ( ) { @ Override public void run ( ) { try { Thread . sleep ( 2000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } } ) ; es . shutdownNow ( ) ; m_ManagedExecutors . shutdownAllExecutorServicesNow ( ) ; }
Verify that an executor service that has already been shutdown doesn't affect the managed executor shutting all
 down.
Verify that an executor service that has already been shutdown doesn ' t affect the managed executor shutting all down .
// shutdown service directly // now shutdown indirectly using managed service