- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 44 for currentThread (0.17 sec)
-
android/guava-tests/test/com/google/common/io/ResourcesTest.java
ClassLoader oldContextLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(loader); URL url = Resources.getResource(tempFile.getName()); String text = Resources.toString(url, UTF_8); assertEquals("rud a chur ar an méar fhada" + System.lineSeparator(), text); } finally { Thread.currentThread().setContextClassLoader(oldContextLoader); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 6.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Callables.java
checkNotNull(callable); return () -> { Thread currentThread = Thread.currentThread(); String oldName = currentThread.getName(); boolean restoreName = trySetName(nameSupplier.get(), currentThread); try { return callable.call(); } finally { if (restoreName) { boolean unused = trySetName(oldName, currentThread); } } }; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 18:32:03 UTC 2023 - 4.4K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Callables.java
checkNotNull(callable); return () -> { Thread currentThread = Thread.currentThread(); String oldName = currentThread.getName(); boolean restoreName = trySetName(nameSupplier.get(), currentThread); try { return callable.call(); } finally { if (restoreName) { boolean unused = trySetName(oldName, currentThread); } } }; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 18:32:03 UTC 2023 - 4.4K bytes - Viewed (0) -
src/main/java/org/codelibs/core/concurrent/CommonPoolUtil.java
} 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 { task.run(); } catch (final Exception e) {
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 1.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
public void testRenaming() throws Exception { String oldName = Thread.currentThread().getName(); final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); Callable<@Nullable Void> callable = new Callable<@Nullable Void>() { @Override public @Nullable Void call() throws Exception { assertEquals(Thread.currentThread().getName(), newName.get()); return null; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 5.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ResourcesTest.java
ClassLoader oldContextLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(loader); URL url = Resources.getResource(tempFile.getName()); String text = Resources.toString(url, UTF_8); assertEquals("rud a chur ar an méar fhada" + System.lineSeparator(), text); } finally { Thread.currentThread().setContextClassLoader(oldContextLoader); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 6.8K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 4.6K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
assertThat(e).hasCauseThat().isInstanceOf(InterruptedException.class); } public void testAwait_countDownLatch_interrupted() { Interruptenator interruptenator = new Interruptenator(Thread.currentThread()); try { final CountDownLatch latch = new CountDownLatch(1); RuntimeException expected = assertThrows(RuntimeException.class, () -> GcFinalization.await(latch));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
assertThat(e).hasCauseThat().isInstanceOf(InterruptedException.class); } public void testAwait_countDownLatch_interrupted() { Interruptenator interruptenator = new Interruptenator(Thread.currentThread()); try { final CountDownLatch latch = new CountDownLatch(1); RuntimeException expected = assertThrows(RuntimeException.class, () -> GcFinalization.await(latch));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java
} /** Interrupts the current thread after sleeping for the specified delay. */ static void requestInterruptIn(final long time, final TimeUnit unit) { checkNotNull(unit); final Thread interruptee = Thread.currentThread(); new Thread( new Runnable() { @Override public void run() { try { unit.sleep(time);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.4K bytes - Viewed (0)