Examples of wait()


Examples of java.util.concurrent.atomic.AtomicInteger.wait()

                                                {
                                                    throw new TimeoutException();
                                                }
                                                while ( available.get() == 0 )
                                                {
                                                    available.wait(timing.forWaiting().milliseconds());
                                                }

                                                thisQty = (available.get() > 1) ? (random.nextInt(available.get()) + 1) : 1;

                                                available.addAndGet(-1 * thisQty);
 

Examples of java.util.concurrent.atomic.AtomicLong.wait()

      // now make sure all of the running tasks have completed
      synchronized(numExecutingOutputs)
      {
         while (numExecutingOutputs.get() > 0)
         {
            try { numExecutingOutputs.wait(); }
            catch (InterruptedException e)
            {
               // if we were interupted for a shutdown then just stop
               // waiting for all of the threads to finish
               if (!isRunning)

Examples of javafx.scene.media.MediaPlayer.wait()

            }
          }
        });
        mediaPlayer.play();
        try {
          mediaPlayer.wait(MAXIMUM_PLAY_TIME_PER_MP3);
        } catch (InterruptedException e) {
          LOGGER.error("Interrupted while waiting for " + mediaPlayer + " to complete play of " + mp3File);
        }
        if (LOGGER.isInfoEnabled()) {
          LOGGER.info(mediaPlayer + " played " + mp3File);

Examples of javax.jms.MessageConsumer.wait()

            }

        };
        synchronized (consumer) {
            new Thread(t).start();
            consumer.wait(10000);
        }
        stopBroker();
        assertTrue(t.passed());
    }

Examples of javax.jms.MessageListener.wait()

      sendThread.start();
      receiver.setMessageListener(listener);
      synchronized (listener)
      {
         queueConnection.start();
         listener.wait();
      }

      if (transacted == TRANS_TOTAL)
      {
         session.commit();

Examples of javax.jms.MessageProducer.wait()

            }
        };
        synchronized(producer) {
            new Thread(t).start();
            //wait until we know that the producer was able to send a message
            producer.wait(10000);
        }

        stopBroker();
        assertTrue(t.passed());
    }

Examples of javax.jms.Session.wait()

                }
            }
        };
        synchronized (session) {
            new Thread(t).start();
            session.wait(10000);
        }
        stopBroker();
        assertTrue(t.passed());
    }

Examples of javax.swing.JFrame.wait()

    frame.setSize(i.getWidth(frame)+10, i.getHeight(frame)+10);
//        frame.setAlwaysOnTop(true);
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.setVisible(true);
    synchronized (frame) {
      frame.wait(1000);
    }
    return frame;
  }

  /*
 

Examples of jnr.posix.POSIX.wait()

    public static IRubyObject waitall(Ruby runtime) {
        POSIX posix = runtime.getPosix();
        RubyArray results = runtime.newArray();
       
        int[] status = new int[1];
        int result = posix.wait(status);
        while (result != -1) {
            results.append(runtime.newArray(runtime.newFixnum(result), RubyProcess.RubyStatus.newProcessStatus(runtime, (status[0] >> 8) & 0xff, result)));
            result = posix.wait(status);
        }
       

Examples of net.sf.jiga.xtended.kernel.Monitor.wait()

        boolean b = false;
        try {
            final Monitor monitor = processMonitor;
            synchronized (monitor) {
                while (processing) {
                    monitor.wait();
                }
                monitor.notify();
                dispatching = true;
                long now = e.getWhen();
                if (hasAttribute("player") ? isPlayerKeycode(e) : true) {
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.