Package java.util

Examples of java.util.Vector.wait()


            long startTime = System.currentTimeMillis();
            long maxwait = MAX_PULL_BLOCK_PERIOD;

            while (pullQ.isEmpty() && (linkTableState == RUNNING)) {
                try {
                    pullQ.wait(maxwait);
                } catch (Exception e) {
                }

                maxwait -= (System.currentTimeMillis() - startTime);
View Full Code Here


        };
        f.getContentPane().add(child);
        f.setVisible(true);// technically, this statement should be in the sync block, but that only works on the Sun JVM..
        synchronized(vars) {
            try {
                vars.wait(1000); // wait until it has been painted, for max of 1 sec.
            } catch(InterruptedException e) {
                // fail
            } finally {
                w = f.getContentPane().getWidth();
                h = f.getContentPane().getHeight();
View Full Code Here

            newR = true;
      break;
        }

        // wait for the resource to free up
        if (!newR) list.wait();
    }
      }
  }

  // if new resource created, initialize the resource
View Full Code Here

                Vector commandQueue = _daemonStore.getCommandQueue();

                synchronized( commandQueue ) {
                    if( commandQueue.size() == 0 ) {
                        try {
                            commandQueue.wait();
                        } catch( Exception e ) {
                            // ignore - check loop
                        }
                    }
                    if( commandQueue.size() > 0 ) {
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.