- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 84 for CountDownLatch (0.09 sec)
-
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java
*/ public class ListenableFutureTaskTest extends TestCase { private ExecutorService exec; protected final CountDownLatch runLatch = new CountDownLatch(1); protected final CountDownLatch taskLatch = new CountDownLatch(1); protected final CountDownLatch listenerLatch = new CountDownLatch(1); protected volatile boolean throwException = false; protected final ListenableFutureTask<Integer> task =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 4.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderTest.java
.build(computingFunction); // seed the map, so its segment's count > 0 cache.getUnchecked("a"); shouldWait.set(true); final CountDownLatch computationStarted = new CountDownLatch(1); final CountDownLatch computationComplete = new CountDownLatch(1); new Thread( new Runnable() { @Override public void run() { computationStarted.countDown();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 15:00:32 UTC 2024 - 24.9K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java
throws Exception { ExecutorService executorService = Executors.newFixedThreadPool(numberOfThreads); final CountDownLatch startLatch = new CountDownLatch(numberOfThreads); final CountDownLatch doneLatch = new CountDownLatch(numberOfThreads); for (int i = numberOfThreads; i > 0; i--) { @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 22 13:49:09 UTC 2024 - 6.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
* period or an interrupt while waiting for the expected event will result in a {@link * RuntimeException}. * * <p>Here's an example that tests a {@code finalize} method: * * <pre>{@code * final CountDownLatch latch = new CountDownLatch(1); * Object x = new MyClass() { * ... * protected void finalize() { latch.countDown(); ... } * }; * x = null; // Hint to the JIT that x is stack-unreachable * GcFinalization.await(latch);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 11.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java
*/ public class AbstractExecutionThreadServiceTest extends TestCase { private final TearDownStack tearDownStack = new TearDownStack(true); private final CountDownLatch enterRun = new CountDownLatch(1); private final CountDownLatch exitRun = new CountDownLatch(1); private Thread executionThread; private Throwable thrownByExecutionThread; private final Executor exceptionCatchingExecutor = new Executor() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 12.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
Executor exec = Executors.newCachedThreadPool(); CountDownLatch countDownLatch = new CountDownLatch(3); list.add(new MockRunnable(countDownLatch), exec); list.add(new MockRunnable(countDownLatch), exec); list.add(new MockRunnable(countDownLatch), exec); assertEquals(3L, countDownLatch.getCount()); list.execute();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 4.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
ExecutorService service = Executors.newFixedThreadPool(4); ListenerCallQueue<Object> queue = new ListenerCallQueue<>(); try { queue.addListener(listener, service); final CountDownLatch latch = new CountDownLatch(1); Multiset<Object> counters = ConcurrentHashMultiset.create(); queue.enqueue(incrementingEvent(counters, listener, 1)); queue.enqueue(incrementingEvent(counters, listener, 2));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 09 22:57:07 UTC 2022 - 8.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
ExecutorService service = Executors.newFixedThreadPool(4); ListenerCallQueue<Object> queue = new ListenerCallQueue<>(); try { queue.addListener(listener, service); final CountDownLatch latch = new CountDownLatch(1); Multiset<Object> counters = ConcurrentHashMultiset.create(); queue.enqueue(incrementingEvent(counters, listener, 1)); queue.enqueue(incrementingEvent(counters, listener, 2));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 09 22:57:07 UTC 2022 - 8.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java
private final Timeout timeout; private final Outcome expectedOutcome; private final Monitor monitor; private final FlagGuard guard; private final CountDownLatch tearDownLatch; private final CountDownLatch doingCallLatch; private final CountDownLatch callCompletedLatch; private GeneratedMonitorTest( Method method, Scenario scenario, boolean fair, @Nullable Timeout timeout,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:18:12 UTC 2024 - 27.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MapMakerTest.java
tester.testAllPublicInstanceMethods(new MapMaker()); } @GwtIncompatible // threads static final class DelayingIdentityLoader<T> implements Function<T, T> { private final CountDownLatch delayLatch; DelayingIdentityLoader(CountDownLatch delayLatch) { this.delayLatch = delayLatch; } @Override public T apply(T key) { awaitUninterruptibly(delayLatch); return key; } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 15 17:36:06 UTC 2024 - 2.7K bytes - Viewed (0)