Examples of awaitNanos()


Examples of co.paralleluniverse.strands.SimpleConditionSynchronizer.awaitNanos()

                try {
                    final long start = System.nanoTime();
                    long left = unit.toNanos(timeout);
                    final long deadline = start + left;
                    for (int i = 0; sync != null; i++) {
                        s.awaitNanos(i, left);
                        if (sync == null)
                            break;
                        left = deadline - System.nanoTime();
                        if (left <= 0)
                            throw new TimeoutException();
View Full Code Here

Examples of co.paralleluniverse.strands.SimpleConditionSynchronizer.awaitNanos()

                try {
                    final long start = System.nanoTime();
                    long left = unit.toNanos(timeout);
                    final long deadline = start + left;
                    for (int i = 0; sync != null; i++) {
                        s.awaitNanos(i, left);
                        left = deadline - System.nanoTime();
                        if (left <= 0)
                            throw new TimeoutException();
                    }
                } finally {
View Full Code Here

Examples of co.paralleluniverse.strands.SimpleConditionSynchronizer.awaitNanos()

        if (s != null) {
            s.register();
            try {
                long left = unit.toNanos(timeout);
                for (int i=0; sync != null; i++) {
                    left = s.awaitNanos(i, left);
                    if (left <= 0)
                        throw new TimeoutException();
                }
            } finally {
                s.unregister();
View Full Code Here

Examples of co.paralleluniverse.strands.SimpleConditionSynchronizer.awaitNanos()

                try {
                    final long start = System.nanoTime();
                    long left = unit.toNanos(timeout);
                    final long deadline = start + left;
                    for (int i = 0; sync != null; i++) {
                        s.awaitNanos(i, left);
                        left = deadline - System.nanoTime();
                        if (left <= 0)
                            throw new TimeoutException();
                    }
                } finally {
View Full Code Here

Examples of co.paralleluniverse.strands.SimpleConditionSynchronizer.awaitNanos()

                try {
                    final long start = System.nanoTime();
                    long left = unit.toNanos(timeout);
                    final long deadline = start + left;
                    for (int i = 0; sync != null; i++) {
                        s.awaitNanos(i, left);
                        left = deadline - System.nanoTime();
                        if (left <= 0)
                            throw new TimeoutException();
                    }
                } finally {
View Full Code Here

Examples of java.util.concurrent.locks.Condition.awaitNanos()

                    throw new IllegalMonitorStateException();
                }
                Condition condition = lock.newCondition();
                if (info.isUseTimeout()) {
                    try {
                        return condition.awaitNanos(info.getTimeUnit().toNanos(
                            info.getTimeout()));
                    }
                    catch (InterruptedException e) {
                        Thread.currentThread().interrupt();
                    }
View Full Code Here

Examples of java.util.concurrent.locks.Condition.awaitNanos()

        do {
          if (remainingNanos <= 0) {
            return false;
          }
          try {
            remainingNanos = condition.awaitNanos(remainingNanos);
          } catch (InterruptedException interrupt) {
            try {
              signalConditionsOfSatisfiedGuards(guard);
            } catch (Throwable throwable) {
              Thread.currentThread().interrupt();
View Full Code Here

Examples of java.util.concurrent.locks.Condition.awaitNanos()

          do {
            if (remainingNanos <= 0) {
              return false;
            }
            try {
              remainingNanos = condition.awaitNanos(remainingNanos);
            } catch (InterruptedException ignored) {
              try {
                signalConditionsOfSatisfiedGuards(guard);
              } catch (Throwable throwable) {
                Thread.currentThread().interrupt();
View Full Code Here

Examples of java.util.concurrent.locks.Condition.awaitNanos()

                    throw new IllegalMonitorStateException();
                }
                Condition condition = lock.newCondition();
                if (info.isUseTimeout()) {
                    try {
                        return condition.awaitNanos(info.getTimeUnit().toNanos(info.getTimeout()));
                    }
                    catch (InterruptedException e) {
                        Thread.currentThread().interrupt();
                    }
                }
View Full Code Here

Examples of java.util.concurrent.locks.Condition.awaitNanos()

        do {
          if (remainingNanos <= 0) {
            return false;
          }
          try {
            remainingNanos = condition.awaitNanos(remainingNanos);
          } catch (InterruptedException interrupt) {
            try {
              signalConditionsOfSatisfiedGuards(guard);
            } catch (Throwable throwable) {
              Thread.currentThread().interrupt();
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.