Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 34 for Closeables (0.04 seconds)

  1. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

          }
        }
    
        void add(@Nullable AutoCloseable closeable, Executor executor) {
          checkNotNull(executor);
          if (closeable == null) {
            return;
          }
          synchronized (this) {
            if (!closed) {
              put(closeable, executor);
              return;
            }
          }
          closeQuietly(closeable, executor);
        }
    
        /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 101.7K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/io/Closer.java

        Throwable throwable = thrown;
    
        // close closeables in LIFO order
        while (!stack.isEmpty()) {
          Closeable closeable = stack.removeFirst();
          try {
            closeable.close();
          } catch (Throwable e) {
            if (throwable == null) {
              throwable = e;
            } else {
              suppressor.suppress(closeable, throwable, e);
            }
          }
        }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 29 22:14:05 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

      final ExecutorService closingExecutor = newSingleThreadExecutor();
    
      final TestCloseable closeable1 = new TestCloseable("closeable1");
      final TestCloseable closeable2 = new TestCloseable("closeable2");
      final TestCloseable closeable3 = new TestCloseable("closeable3");
      final TestCloseable closeable4 = new TestCloseable("closeable4");
    
      final Waiter waiter = new Waiter();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 63K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

      final ExecutorService closingExecutor = newSingleThreadExecutor();
    
      final TestCloseable closeable1 = new TestCloseable("closeable1");
      final TestCloseable closeable2 = new TestCloseable("closeable2");
      final TestCloseable closeable3 = new TestCloseable("closeable3");
      final TestCloseable closeable4 = new TestCloseable("closeable4");
    
      final Waiter waiter = new Waiter();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 63K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/io/CloserTest.java

          this.closeable = closeable;
          this.thrown = thrown;
          this.suppressed = suppressed;
        }
    
        @Override
        public boolean equals(@Nullable Object obj) {
          if (obj instanceof Suppression) {
            Suppression other = (Suppression) obj;
            return closeable.equals(other.closeable)
                && thrown.equals(other.thrown)
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 11.9K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureLeakTest.java

    @J2ktIncompatible
    public class ClosingFutureLeakTest extends TestCase {
      public void testLeak() {
        TestCloseable closeable = new TestCloseable("closeable");
        awaitClear(leakClosingFuture(closeable));
        assertThat(closeable.awaitClosed()).isTrue();
      }
    
      private WeakReference<ClosingFuture<String>> leakClosingFuture(TestCloseable closeable) {
        ClosingFuture<String> willCloseCloseable =
            ClosingFuture.submit(
                closer -> {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 1.8K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/util/concurrent/ClosingFutureLeakTest.java

    @J2ktIncompatible
    public class ClosingFutureLeakTest extends TestCase {
      public void testLeak() {
        TestCloseable closeable = new TestCloseable("closeable");
        awaitClear(leakClosingFuture(closeable));
        assertThat(closeable.awaitClosed()).isTrue();
      }
    
      private WeakReference<ClosingFuture<String>> leakClosingFuture(TestCloseable closeable) {
        ClosingFuture<String> willCloseCloseable =
            ClosingFuture.submit(
                closer -> {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 1.8K bytes
    - Click Count (0)
  8. guava-tests/test/com/google/common/io/CloserTest.java

          this.closeable = closeable;
          this.thrown = thrown;
          this.suppressed = suppressed;
        }
    
        @Override
        public boolean equals(@Nullable Object obj) {
          if (obj instanceof Suppression) {
            Suppression other = (Suppression) obj;
            return closeable.equals(other.closeable)
                && thrown.equals(other.thrown)
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 11.9K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java

      }
    
      public void testFinishToValueAndCloser_throwsAfterCallingFinishToFuture() throws Exception {
        ClosingFuture<Closeable> closingFuture =
            ClosingFuture.submit(closer -> closer.eventuallyClose(mockCloseable, executor), executor);
        FluentFuture<Closeable> unused = closingFuture.finishToFuture();
        assertThrows(
            IllegalStateException.class,
            () ->
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 5.2K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToFutureTest.java

        ClosingFuture<Closeable> closingFuture =
            ClosingFuture.submit(closer -> closer.eventuallyClose(mockCloseable, executor), executor);
        FluentFuture<Closeable> unused = closingFuture.finishToFuture();
        assertThrows(
            IllegalStateException.class,
            () -> {
              FluentFuture<Closeable> unused2 = closingFuture.finishToFuture();
            });
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 3.3K bytes
    - Click Count (0)
Back to Top