Package org.jboss.util.threadpool

Examples of org.jboss.util.threadpool.BasicThreadPool.stop()


         assertEquals(expected, started.tasks);
         assertEquals(expected, completed.tasks);
      }
      finally
      {
         pool.stop(true);
      }
   }

   /**
    * Multiple Basic test
View Full Code Here


         assertEquals(expected, started.tasks);
         assertEquals(expected, completed.tasks);
      }
      finally
      {
         pool.stop(true);
      }
   }

   /**
    * Test pooling
View Full Code Here

         completed.wait(2);
         assertEquals(threadNames.get("test1"), threadNames.get("test2"));
      }
      finally
      {
         pool.stop(true);
      }
   }

   /**
    * Test multiple pooling
View Full Code Here

         completed.wait(2);
         assertTrue("Shouldn't run on the same thread", threadNames.get("test1").equals(threadNames.get("test2")) == false);
      }
      finally
      {
         pool.stop(true);
      }
   }

   /**
    * Test maximum pool
View Full Code Here

         completed.wait(2);
         assertEquals(makeExpected(new Object[] {"test1", "test2"}), completed.tasks);
      }
      finally
      {
         pool.stop(true);
      }
   }

   /**
    * Test maximum cache
View Full Code Here

         completed.wait(2);
         assertEquals(makeExpected(new Object[] {"test1", "test2"}), completed.tasks);
      }
      finally
      {
         pool.stop(true);
      }
   }

   /**
    * Test maximum cache
View Full Code Here

         stopped.wait(1);        
         completed.wait(1);
      }
      finally
      {
         pool.stop(true);
      }
   }

   public void testCompleteTimeoutWithSpinLoop() throws Exception
   {
View Full Code Here

         stopped.wait(1);        
         completed.wait(1);
      }
      finally
      {
         pool.stop(true);
      }
   }

   /**
    * Save the thread name
View Full Code Here

         HashSet expected = makeExpected(new Object[] {"test"});
         assertEquals(expected, finishedRunnables);
      }
      finally
      {
         pool.stop(true);
      }
   }

   /**
    * Multiple Basic test
View Full Code Here

         HashSet expected = makeExpected(new Object[] {"test1", "test2", "test3"});
         assertEquals(expected, finishedRunnables);
      }
      finally
      {
         pool.stop(true);
      }
   }

   /**
    * Test pooling
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.