Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 836 for closedc (1.32 sec)

  1. internal/http/close.go

    )
    
    // DrainBody close non nil response with any response Body.
    // convenient wrapper to drain any remaining data on response body.
    //
    // Subsequently this allows golang http RoundTripper
    // to reuse the same connection for future requests.
    func DrainBody(respBody io.ReadCloser) {
    	// Callers should close resp.Body when done reading from it.
    	// If resp.Body is not closed, the Client's underlying RoundTripper
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. test/chan/select3.go

    		ch <- 7
    	})
    
    	// receiving from a closed channel never blocks
    	testBlock(never, func() {
    		for i := 0; i < 10; i++ {
    			if <-closedch != 0 {
    				panic("expected zero value when reading from closed channel")
    			}
    			if x, ok := <-closedch; x != 0 || ok {
    				println("closedch:", x, ok)
    				panic("expected 0, false from closed channel")
    			}
    		}
    	})
    
    	// sending to a closed channel panics.
    	testPanic(always, func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jul 08 02:10:12 UTC 2017
    - 4.1K bytes
    - Viewed (0)
  3. internal/s3select/progress.go

    }
    
    func (pr *progressReader) Close() error {
    	pr.closedMu.Lock()
    	defer pr.closedMu.Unlock()
    	if pr.closed {
    		return nil
    	}
    	pr.closed = true
    	if pr.closer != nil {
    		pr.closer.Close()
    	}
    	return pr.rc.Close()
    }
    
    func (pr *progressReader) Stats() (bytesScanned, bytesProcessed int64) {
    	if pr == nil {
    		return 0, 0
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Oct 18 15:44:36 UTC 2021
    - 4.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/ByteSink.java

        checkNotNull(bytes);
    
        Closer closer = Closer.create();
        try {
          OutputStream out = closer.register(openStream());
          out.write(bytes);
          out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  5. guava/src/com/google/common/io/ByteSink.java

        checkNotNull(bytes);
    
        Closer closer = Closer.create();
        try {
          OutputStream out = closer.register(openStream());
          out.write(bytes);
          out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  6. src/os/file_mutex_plan9.go

    // readUnlock removes a reference from the file and unlocks it for reading.
    // It also closes the file if it marked as closed and there is no remaining
    // reference.
    func (file *file) readUnlock() {
    	if file.fdmu.ReadUnlock() {
    		file.destroy()
    	}
    }
    
    // writeLock adds a reference to the file and locks it for writing.
    // It returns an error if the file is already closed.
    func (file *file) writeLock() error {
    	if !file.fdmu.WriteLock() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Oct 08 03:57:40 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/core/DefaultModelViewState.java

        }
    
        public void close() {
            closed = true;
        }
    
        public Action<Object> closer() {
            return new Action<Object>() {
                @Override
                public void execute(Object o) {
                    close();
                }
            };
        }
    
        @Override
        public void assertCanMutate() {
            if (closed) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  8. src/net/textproto/writer.go

    	w.closeDot()
    	fmt.Fprintf(w.W, format, args...)
    	w.W.Write(crnl)
    	return w.W.Flush()
    }
    
    // DotWriter returns a writer that can be used to write a dot-encoding to w.
    // It takes care of inserting leading dots when necessary,
    // translating line-ending \n into \r\n, and adding the final .\r\n line
    // when the DotWriter is closed. The caller should close the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  9. src/crypto/cipher/io.go

    	if n != len(src) && err == nil { // should never happen
    		err = io.ErrShortWrite
    	}
    	return
    }
    
    // Close closes the underlying Writer and returns its Close return value, if the Writer
    // is also an io.Closer. Otherwise it returns nil.
    func (w StreamWriter) Close() error {
    	if c, ok := w.W.(io.Closer); ok {
    		return c.Close()
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  10. platforms/core-runtime/launcher/src/integTest/groovy/org/gradle/launcher/continuous/CancellationContinuousIntegrationTest.groovy

            then:
            cancelsAndExits()
        }
    
        def "should cancel build when System.in is closed"() {
            given:
            succeeds("build")
    
            when:
            gradle.stdinPipe.close()
    
            then:
            cancelsAndExits()
        }
    
        def "should cancel build when System.in contains some other characters, then closes"() {
            when:
            succeeds("build")
            stdinPipe << 'abc'
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 2.5K bytes
    - Viewed (0)
Back to top