- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 87 for currentThread (0.08 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
public void testRenaming() throws Exception { String oldName = Thread.currentThread().getName(); 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: 2025-05-30 12:43 - Last Modified: 2025-05-13 18:46 - 4.4K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java
Registered: 2025-05-30 12:43 - Last Modified: 2025-04-14 16:07 - 19.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt
} internal inline fun threadName( name: String, block: () -> Unit, ) { val currentThread = Thread.currentThread() val oldName = currentThread.name currentThread.name = name try { block() } finally { currentThread.name = oldName } } /** Returns the Content-Length as reported by the response headers. */
Registered: 2025-05-30 11:42 - Last Modified: 2025-05-28 23:28 - 9.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 { CountDownLatch latch = new CountDownLatch(1); RuntimeException expected = assertThrows(RuntimeException.class, () -> GcFinalization.await(latch));
Registered: 2025-05-30 12:43 - Last Modified: 2025-05-13 18:46 - 7.9K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java
* interrupt, yet it will still run, since interruptTask will leave the runner value null, * allowing the CAS below to succeed. */ Thread currentThread = Thread.currentThread(); if (!compareAndSet(null, currentThread)) { return; // someone else has run or is running. } boolean run = !isDone(); T result = null; Throwable error = null; try { if (run) {
Registered: 2025-05-30 12:43 - Last Modified: 2025-02-24 16:28 - 10K 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: 2025-05-24 08:58 - Last Modified: 2025-05-10 01:32 - 1.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java
// longer than necessary. submitting = null; } } @SuppressWarnings("ShortCircuitBoolean") @Override public void run() { Thread currentThread = Thread.currentThread(); if (currentThread != submitting) { /* * requireNonNull is safe because we set `task` before submitting this Runnable to an * Executor, and we don't null it out until here. */
Registered: 2025-05-30 12:43 - Last Modified: 2025-02-19 17:40 - 22.1K bytes - Viewed (0) -
src/main/java/jcifs/util/transport/Transport.java
try { long timeout = !params.contains(RequestParam.NO_TIMEOUT) ? getResponseTimeout(request) : 0; long firstKey = doSend(request, response, params, timeout); if ( Thread.currentThread() == this.thread ) { // we are in the transport thread, ie. on idle disconnecting // this is synchronous operation // This does not handle compound requests
Registered: 2025-05-25 00:10 - Last Modified: 2020-11-01 18:12 - 24.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Platform.java
static void restoreInterruptIfIsInterruptedException(Throwable t) { checkNotNull(t); // to satisfy NullPointerTester if (t instanceof InterruptedException) { currentThread().interrupt(); } } static void interruptCurrentThread() { Thread.currentThread().interrupt(); } static void rethrowIfErrorOtherThanStackOverflow(Throwable t) { checkNotNull(t);
Registered: 2025-05-30 12:43 - Last Modified: 2025-02-21 02:38 - 2.1K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Platform.java
static void restoreInterruptIfIsInterruptedException(Throwable t) { checkNotNull(t); // to satisfy NullPointerTester if (t instanceof InterruptedException) { currentThread().interrupt(); } } static void interruptCurrentThread() { Thread.currentThread().interrupt(); } static void rethrowIfErrorOtherThanStackOverflow(Throwable t) { checkNotNull(t);
Registered: 2025-05-30 12:43 - Last Modified: 2025-02-21 02:38 - 2.1K bytes - Viewed (0)