Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,216 for close (0.16 sec)

  1. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        val relay = edit(file, upstream, metadata, 1024)
        val source1 = relay.newSource()
        val source2 = relay.newSource()
        source1!!.close()
        source1.close() // Unnecessary. Shouldn't decrement the reference count.
        assertThat(relay.isClosed).isFalse()
        source2!!.close()
        assertThat(relay.isClosed).isTrue()
        assertFile(Relay.PREFIX_DIRTY, -1L, -1, null, null)
      }
    
      @Test
      fun racingReaders() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/ByteSourceTest.java

      private static final ByteSource BROKEN_CLOSE_SOURCE =
          new TestByteSource(new byte[10], CLOSE_THROWS);
      private static final ByteSource BROKEN_OPEN_SOURCE =
          new TestByteSource(new byte[10], OPEN_THROWS);
      private static final ByteSource BROKEN_READ_SOURCE =
          new TestByteSource(new byte[10], READ_THROWS);
      private static final ByteSink BROKEN_CLOSE_SINK = new TestByteSink(CLOSE_THROWS);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

            synchronized(this) {
              queueSize -= message.data.size.toLong()
            }
          } else if (messageOrClose is Close) {
            val close = messageOrClose as Close
            writer!!.writeClose(close.code, close.reason)
    
            // We closed the writer: now both reader and writer are closed.
            if (streamsToClose != null) {
              listener.onClosed(this, receivedCloseCode, receivedCloseReason!!)
            }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/CharSourceTest.java

      static final CharSource BROKEN_CLOSE_SOURCE = new TestCharSource("ABC", CLOSE_THROWS);
      static final CharSource BROKEN_OPEN_SOURCE = new TestCharSource("ABC", OPEN_THROWS);
      static final CharSink BROKEN_WRITE_SINK = new TestCharSink(WRITE_THROWS);
      static final CharSink BROKEN_CLOSE_SINK = new TestCharSink(CLOSE_THROWS);
      static final CharSink BROKEN_OPEN_SINK = new TestCharSink(OPEN_THROWS);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13K bytes
    - Viewed (0)
  5. internal/s3select/simdj/reader.go

    	if !ok {
    		dstRec = &Record{}
    	}
    	dstRec.object = v
    	return dstRec, nil
    }
    
    // Close - closes underlying reader.
    func (r *Reader) Close() error {
    	// Close the input.
    	// Potentially racy if the stream decoder is still reading.
    	if r.readCloser != nil {
    		r.readCloser.Close()
    	}
    	if r.exitReader != nil {
    		close(r.exitReader)
    		r.readerWg.Wait()
    		r.exitReader = nil
    		r.input = nil
    	}
    	return nil
    }
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 30 17:02:22 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  6. .github/workflows/stale-pr.yml

                It will be closed in 14 days if no further activity occurs.
                If you don't want the stale bot to close it, then set a milestone for it.
              days-before-pr-close: 14
              close-pr-message: >
    Others
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Mon Feb 05 12:52:42 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  7. internal/s3select/json/reader.go

    	}
    	dstRec.KVS = kvs
    	dstRec.SelectFormat = sql.SelectFmtJSON
    	return dstRec, nil
    }
    
    // Close - closes underlying reader.
    func (r *Reader) Close() error {
    	// Close the input.
    	err := r.readCloser.Close()
    	for range r.valueCh {
    		// Drain values so we don't leak a goroutine.
    		// Since we have closed the input, it should fail rather quickly.
    	}
    	return err
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 24 03:58:53 GMT 2022
    - 3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/ResponseBodyTest.kt

              val source = Buffer().writeUtf8("hello")
              return object : ForwardingSource(source) {
                override fun close() {
                  closed = true
                  super.close()
                }
              }.buffer()
            }
          }
        body.source().close()
        assertThat(closed).isTrue()
      }
    
      @Test
      fun throwingUnderlyingSourceClosesQuietly() {
        val body: ResponseBody =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     * must close this body by calling any of the following methods:
     *
     * * `Response.close()`
     * * `Response.body().close()`
     * * `Response.body().source().close()`
     * * `Response.body().charStream().close()`
     * * `Response.body().byteStream().close()`
     * * `Response.body().bytes()`
     * * `Response.body().string()`
     *
     * There is no benefit to invoking multiple `close()` methods for the same response body.
     *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

                @Throws(IOException::class)
                override fun close() {
                  closed.set(true)
                  super.close()
                }
              }.buffer()
            }
          }
        body.charStream().close()
        assertThat(closed.get()).isTrue()
      }
    
      @Test
      fun readerClosedAfterBomClosesUnderlyingSource() {
        val closed = AtomicBoolean()
        val body: ResponseBody =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
Back to top