- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 635 for thread (0.3 sec)
-
okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt
private fun sleep(delayMillis: Int) { try { Thread.sleep(delayMillis.toLong()) } catch (e: InterruptedException) { Thread.currentThread().interrupt() } } private fun cancelLater( call: Call, delayMillis: Int, ): CountDownLatch { val latch = CountDownLatch(1) Thread { sleep(delayMillis) if (cancelMode == CANCEL) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 9.9K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/Striped64.java
* there would exist a perfect hash function mapping threads to * slots that eliminates collisions. When we reach capacity, we * search for this mapping by randomly varying the hash codes of * colliding threads. Because search is random, and collisions * only become known via CAS failures, convergence can be slow, * and because threads are typically not bound to CPUS forever, * may not occur at all. However, despite these limitations,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 14 17:55:55 UTC 2024 - 11.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java
} @J2ktIncompatible @GwtIncompatible // Thread.interrupt public void testGetUnchecked_interrupted() { Thread.currentThread().interrupt(); try { assertEquals("foo", getUnchecked(immediateFuture("foo"))); assertTrue(Thread.currentThread().isInterrupted()); } finally { Thread.interrupted(); } } public void testGetUnchecked_cancelled() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 4.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java
} @J2ktIncompatible @GwtIncompatible // Thread.interrupt public void testGetUnchecked_interrupted() { Thread.currentThread().interrupt(); try { assertEquals("foo", getUnchecked(immediateFuture("foo"))); assertTrue(Thread.currentThread().isInterrupted()); } finally { Thread.interrupted(); } } public void testGetUnchecked_cancelled() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 4.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java
Thread.currentThread().interrupt(); try { getChecked(future, TwoArgConstructorException.class); fail(); } catch (TwoArgConstructorException expected) { assertThat(expected).hasCauseThat().isInstanceOf(InterruptedException.class); assertTrue(Thread.currentThread().isInterrupted()); } finally { Thread.interrupted(); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.3K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/ProcessHelper.java
ist.interrupt(); } catch (final Exception e) { logger.warn("Could not interrupt a thread of an input stream.", e); } final CountDownLatch latch = new CountDownLatch(3); final Process process = jobProcess.getProcess(); new Thread(() -> { try { CloseableUtil.closeQuietly(process.getInputStream());
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Fri Oct 11 21:20:39 UTC 2024 - 6.4K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader(); try { for (AbstractMavenLifecycleParticipant listener : getExtensionComponents(session.getProjects(), AbstractMavenLifecycleParticipant.class)) { Thread.currentThread().setContextClassLoader(listener.getClass().getClassLoader());
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 27.5K bytes - Viewed (1) -
guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java
prev = x; } } } /** compareAndSet in one thread enables another waiting for value to succeed */ public void testCompareAndSetInMultipleThreads() throws InterruptedException { final AtomicDoubleArray a = new AtomicDoubleArray(1); a.set(0, 1.0); Thread t = newStartedThread( new CheckedRunnable() { @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 14.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt
assertThat(realTaskRunner.activeQueues()).isNotEmpty() Thread.sleep(100) val threads = arrayOfNulls<Thread>(Thread.activeCount() * 2) Thread.enumerate(threads) for (t in threads) { if (t != null && t.name == "OkHttp TaskRunner") { t.interrupt() } } Thread.sleep(100) assertThat(realTaskRunner.activeQueues()).isEmpty() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jun 22 16:06:35 UTC 2024 - 12.8K bytes - Viewed (0) -
src/main/java/org/codelibs/core/concurrent/CommonPoolUtil.java
private CommonPoolUtil() { // nothing } public static void execute(final Runnable task) { ForkJoinPool.commonPool().execute(() -> { final Thread currentThread = Thread.currentThread(); final ClassLoader orignal = currentThread.getContextClassLoader(); currentThread.setContextClassLoader(CommonPoolUtil.class.getClassLoader()); try {
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 1.5K bytes - Viewed (0)