Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 1,847 for closeFD (0.18 sec)

  1. android/guava-tests/test/com/google/common/io/CharSinkTest.java

        assertEquals(STRING, sink.getString());
      }
    
      public void testWriteFromStream_doesNotCloseThatStream() throws IOException {
        TestReader in = new TestReader();
        assertFalse(in.closed());
        sink.writeFrom(in);
        assertFalse(in.closed());
      }
    
      public void testWriteLines_withSpecificSeparator() throws IOException {
        sink.writeLines(ImmutableList.of("foo", "bar", "baz"), "\n");
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4K bytes
    - Viewed (0)
  2. src/net/http/requestwrite_test.go

    		}
    	}
    }
    
    type closeChecker struct {
    	io.Reader
    	closed bool
    }
    
    func (rc *closeChecker) Close() error {
    	rc.closed = true
    	return nil
    }
    
    // TestRequestWriteClosesBody tests that Request.Write closes its request.Body.
    // It also indirectly tests NewRequest and that it doesn't wrap an existing Closer
    // inside a NopCloser, and that it serializes it correctly.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 01:07:32 UTC 2022
    - 23.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

    @SafeVarargs
    internal fun <T> immutableListOf(vararg elements: T): List<T> {
      return Collections.unmodifiableList(listOf(*elements.clone()))
    }
    
    /** Closes this, ignoring any checked exceptions. */
    internal fun Socket.closeQuietly() {
      try {
        close()
      } catch (e: AssertionError) {
        throw e
      } catch (rethrown: RuntimeException) {
        if (rethrown.message == "bio == null") {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  4. src/cmd/go/terminal_test.go

    	// that it won't add a terminal in the middle, but that would be pretty weird.)
    	t.Run("pipe", func(t *testing.T) {
    		r, w, err := os.Pipe()
    		if err != nil {
    			t.Fatalf("pipe failed: %s", err)
    		}
    		defer r.Close()
    		defer w.Close()
    		stdout, stderr := runTerminalPassthrough(t, r, w)
    		if stdout {
    			t.Errorf("stdout is unexpectedly a terminal")
    		}
    		if stderr {
    			t.Errorf("stderr is unexpectedly a terminal")
    		}
    	})
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 07 18:18:50 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  5. test/typeparam/orderedmapsimp.dir/a.go

    // The value will not be sent if the context is closed or the receiver
    // is freed.
    func (s *Sender[Elem]) Send(ctx context.Context, v Elem) bool {
    	select {
    	case <-ctx.Done():
    		return false
    	case s.values <- v:
    		return true
    	case <-s.done:
    		return false
    	}
    }
    
    // Close tells the receiver that no more values will arrive.
    // After Close is called, the Sender may no longer be used.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:40:40 UTC 2021
    - 5.5K bytes
    - Viewed (0)
  6. pkg/volume/csi/fake/fake_closer.go

    import (
    	"testing"
    )
    
    func NewCloser(t *testing.T) *Closer {
    	return &Closer{
    		t: t,
    	}
    }
    
    type Closer struct {
    	wasCalled bool
    	t         *testing.T
    }
    
    func (c *Closer) Close() error {
    	c.wasCalled = true
    	return nil
    }
    
    func (c *Closer) Check() *Closer {
    	c.t.Helper()
    
    	if !c.wasCalled {
    		c.t.Error("expected closer to have been called")
    	}
    
    	return c
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 15 19:55:37 UTC 2018
    - 944 bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

      }
    
      @Throws(IOException::class)
      fun flush() {
        this.withLock {
          if (closed) throw IOException("closed")
          sink.flush()
        }
      }
    
      @Throws(IOException::class)
      fun rstStream(
        streamId: Int,
        errorCode: ErrorCode,
      ) {
        this.withLock {
          if (closed) throw IOException("closed")
          require(errorCode.httpCode != -1)
    
          frameHeader(
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go

    	for _, s := range conn.channels {
    		s.Close()
    	}
    	var err error
    	if conn.ws != nil {
    		err = conn.ws.Close()
    	}
    	return err
    }
    
    // Close is only valid after Open has been called
    func (conn *Conn) Close() error {
    	<-conn.ready
    	return conn.closeNonThreadSafe()
    }
    
    // protocolSupportsStreamClose returns true if the passed protocol
    // supports the stream close signal (currently only V5 remotecommand);
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:10:30 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  9. platforms/core-configuration/model-core/src/main/java/org/gradle/model/ModelViewClosedException.java

     * Such as when an anonymous inner class or closure “closes over” the subject.
     */
    @Incubating
    public class ModelViewClosedException extends ReadOnlyModelViewException {
        public ModelViewClosedException(ModelPath path, ModelType<?> type, ModelRuleDescriptor ruleDescriptor) {
            super(createMessage("closed", path, type, ruleDescriptor));
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

          )
    
        val part = parts.nextPart()!!
        parts.close()
    
        assertFailsWith<IllegalStateException> {
          part.body.request(10)
        }.also { expected ->
          assertThat(expected).hasMessage("closed")
        }
      }
    
      @Test fun `cannot call nextPart after calling close`() {
        val parts =
          MultipartReader(
            boundary = "simple boundary",
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.8K bytes
    - Viewed (0)
Back to top