[jboss-cvs] CacheBenchFwk/src/org/cachebench ...

Manik Surtani manik at jboss.org
Mon May 21 08:44:36 EDT 2007


  User: msurtani
  Date: 07/05/21 08:44:36

  Modified:    src/org/cachebench  CacheBenchmarkSlave.java
  Log:
  Better blocking
  
  Revision  Changes    Path
  1.6       +5 -11     CacheBenchFwk/src/org/cachebench/CacheBenchmarkSlave.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheBenchmarkSlave.java
  ===================================================================
  RCS file: /cvsroot/jboss/CacheBenchFwk/src/org/cachebench/CacheBenchmarkSlave.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- CacheBenchmarkSlave.java	21 May 2007 12:42:21 -0000	1.5
  +++ CacheBenchmarkSlave.java	21 May 2007 12:44:36 -0000	1.6
  @@ -11,12 +11,13 @@
   import java.net.MalformedURLException;
   import java.net.URL;
   import java.util.List;
  +import java.util.concurrent.Semaphore;
   
   import sun.misc.Unsafe;
   
   /**
    * @author Manik Surtani (manik at surtani.org)
  - * @version $Id: CacheBenchmarkSlave.java,v 1.5 2007/05/21 12:42:21 msurtani Exp $
  + * @version $Id: CacheBenchmarkSlave.java,v 1.6 2007/05/21 12:44:36 msurtani Exp $
    */
   public class CacheBenchmarkSlave
   {
  @@ -80,17 +81,10 @@
               c.setUp();
   
               logger.info("Slave is listening.  CTRL-C to kill.");
  -            Unsafe.getUnsafe().park(true, 30 * 60 * 1000);
  -/*
  -            while (true)
  -            {
  -               Thread.sleep(60000);
  -//               Thread.sleep(5000);
  -               //System.out.println("Cache status: " + c.getInfo());
  -            }
  -*/
  -
  +            Semaphore sema = new Semaphore(1);
   
  +            // hack to cause the main thread to wait forever.
  +            for (int i = 0; i<2; i++) sema.acquire();
            }
            catch (Exception e)
            {
  
  
  



More information about the jboss-cvs-commits mailing list