Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 52 for currentThread (0.17 sec)

  1. android/guava/src/com/google/common/collect/Queues.java

              }
              buffer.add(e);
              added++;
            }
          }
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
        return added;
      }
    
      /**
       * Returns a synchronized (thread-safe) queue backed by the specified queue. In order to guarantee
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 16K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

         */
        Waiter(boolean unused) {}
    
        Waiter() {
          // avoid volatile write, write is made visible by subsequent CAS on waiters field
          ATOMIC_HELPER.putThread(this, Thread.currentThread());
        }
    
        // non-volatile write to the next field. Should be made visible by subsequent CAS on waiters
        // field.
        void setNext(@CheckForNull Waiter next) {
          ATOMIC_HELPER.putNext(this, next);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        String oldName = Thread.currentThread().getName();
        renamingExecutor.execute(
            new Runnable() {
              @Override
              public void run() {
                assertEquals("FooBar", Thread.currentThread().getName());
              }
            });
        assertEquals(oldName, Thread.currentThread().getName());
      }
    
      public void testExecutors_nullCheck() throws Exception {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

                // this simply delays executing listeners
                try {
                  Thread.sleep(TimeUnit.SECONDS.toMillis(10));
                } catch (InterruptedException ignored) {
                  Thread.currentThread().interrupt(); // preserve status
                }
              }
            };
        Thread t =
            new Thread() {
              @Override
              public void run() {
                f.set("foo");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

            service.awaitTermination(halfTimeoutNanos, TimeUnit.NANOSECONDS);
          }
        } catch (InterruptedException ie) {
          // Preserve interrupt status
          Thread.currentThread().interrupt();
          // (Re-)Cancel if current thread also interrupted
          service.shutdownNow();
        }
        return service.isTerminated();
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

                  combinerCompletedWithoutInterrupt.countDown();
                } catch (InterruptedException e) {
                  // Ensure the thread's interrupt status is preserved.
                  Thread.currentThread().interrupt();
                  throw new RuntimeException(e);
                }
              }
            };
    
        ListenableFuture<?> futureResult =
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/cache/LocalCache.java

                directExecutor());
          } catch (Throwable t) {
            ListenableFuture<V> result = setException(t) ? futureValue : fullyFailedFuture(t);
            if (t instanceof InterruptedException) {
              Thread.currentThread().interrupt();
            }
            return result;
          }
        }
    
        @CheckForNull
        public V compute(
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

                  combinerCompletedWithoutInterrupt.countDown();
                } catch (InterruptedException e) {
                  // Ensure the thread's interrupt status is preserved.
                  Thread.currentThread().interrupt();
                  throw new RuntimeException(e);
                }
              }
            };
    
        ListenableFuture<?> futureResult =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/cache/LocalCacheTest.java

          assertThat(cache.getOrLoad("test")).isEqualTo("testLoad");
          reloadStarted.await();
          ticker.advance(500, MILLISECONDS); // so that the entry expires during the reload
          threadAboutToBlockForRefresh.set(Thread.currentThread());
          assertThat(cache.getOrLoad("test")).isEqualTo("testReload");
        } finally {
          refreshExecutor.shutdown();
        }
      }
    
      public void testSetRemovalListener() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 112.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

          assertThat(cache.getOrLoad("test")).isEqualTo("testLoad");
          reloadStarted.await();
          ticker.advance(500, MILLISECONDS); // so that the entry expires during the reload
          threadAboutToBlockForRefresh.set(Thread.currentThread());
          assertThat(cache.getOrLoad("test")).isEqualTo("testReload");
        } finally {
          refreshExecutor.shutdown();
        }
      }
    
      public void testSetRemovalListener() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 110.7K bytes
    - Viewed (0)
Back to top