Esempio n. 1
0
 public final void runInner() throws IOException {
   while (!isStopped()) {
     ThreadU.sleepMillis(pollInterval);
     write();
   }
   MutexU.notifyAll(this);
 }
Esempio n. 2
0
 private int waitForData(final Session session, final long pollInterval) throws IOException {
   int condition;
   do {
     ThreadU.sleepMillis(pollInterval);
     condition = session.waitForCondition(Const.DATA, pollInterval);
   } while ((condition & Const.DATA) != 0);
   return condition;
 }