- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 3,379 for FClose (0.28 sec)
-
src/compress/gzip/example_test.go
if err != nil { log.Fatal(err) } if err := zw.Close(); err != nil { log.Fatal(err) } zr, err := gzip.NewReader(&buf) if err != nil { log.Fatal(err) } fmt.Printf("Name: %s\nComment: %s\nModTime: %s\n\n", zr.Name, zr.Comment, zr.ModTime.UTC()) if _, err := io.Copy(os.Stdout, zr); err != nil { log.Fatal(err) } if err := zr.Close(); err != nil { log.Fatal(err) } // Output:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 22 16:24:14 UTC 2022 - 4.8K bytes - Viewed (0) -
src/archive/zip/register.go
} type pooledFlateWriter struct { mu sync.Mutex // guards Close and Write fw *flate.Writer } func (w *pooledFlateWriter) Write(p []byte) (n int, err error) { w.mu.Lock() defer w.mu.Unlock() if w.fw == nil { return 0, errors.New("Write after Close") } return w.fw.Write(p) } func (w *pooledFlateWriter) Close() error { w.mu.Lock() defer w.mu.Unlock() var err error if w.fw != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 3.7K bytes - Viewed (0) -
src/net/protoconn_test.go
if err != nil { t.Fatal(err) } defer ln.Close() ln.Addr() mustSetDeadline(t, ln.SetDeadline, 30*time.Nanosecond) if c, err := ln.Accept(); err != nil { if !err.(Error).Timeout() { t.Fatal(err) } } else { c.Close() } if c, err := ln.AcceptTCP(); err != nil { if !err.(Error).Timeout() { t.Fatal(err) } } else { c.Close() } if f, err := ln.File(); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 7.4K bytes - Viewed (0) -
pkg/queue/instance_test.go
close(stop) }) select { case <-time.After(200 * time.Millisecond): t.Error("close stop, method exit timeout.") case <-signal: t.Log("queue return.") } } func TestClosed(t *testing.T) { t.Run("immediate close", func(t *testing.T) { stop := make(chan struct{}) q := NewQueue(0) go q.Run(stop) close(stop)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jul 21 16:30:36 UTC 2023 - 3.4K bytes - Viewed (0) -
src/os/readfrom_linux_test.go
hook := hookCopyFileRange(t) pr1, pw1, err := Pipe() if err != nil { t.Fatal(err) } defer pr1.Close() defer pw1.Close() pr2, pw2, err := Pipe() if err != nil { t.Fatal(err) } defer pr2.Close() defer pw2.Close() // The pipe is empty, and PIPE_BUF is large enough // for this, by (POSIX) definition, so there is no
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:49:26 UTC 2024 - 20.3K bytes - Viewed (0) -
src/io/pipe_test.go
go func() { w.Write([]byte{}) w.Close() }() var b [2]byte ReadFull(r, b[0:2]) r.Close() } func TestWriteNil(t *testing.T) { r, w := Pipe() go func() { w.Write(nil) w.Close() }() var b [2]byte ReadFull(r, b[0:2]) r.Close() } func TestWriteAfterWriterClose(t *testing.T) { r, w := Pipe() defer r.Close() done := make(chan bool) var writeErr error
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CloseablesTest.java
import java.io.Reader; import junit.framework.TestCase; /** * Unit tests for {@link Closeables}. * * <p>Checks proper closing behavior, and ensures that IOExceptions on Closeable.close() are not * propagated out from the {@link Closeables#close} method if {@code swallowException} is true. * * @author Michael Lancaster */ public class CloseablesTest extends TestCase { private Closeable mockCloseable;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4K bytes - Viewed (0) -
src/runtime/race/testdata/chan_test.go
go func() { v = 1 close(c) }() _, _ = <-c v = 2 } func TestNoRaceChanSyncCloseRecv3(t *testing.T) { v := 0 _ = v c := make(chan int) go func() { v = 1 close(c) }() for range c { } v = 2 } func TestRaceChanSyncCloseSend(t *testing.T) { v := 0 _ = v c := make(chan int) go func() { v = 1 close(c) }() func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 18 19:55:29 UTC 2023 - 11K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt
/** * Half close connection (InputStream for client) after reading the request but before * writing the response. Use this to simulate late connection pool failures. */ object HalfCloseAfterRequest : SocketPolicy /** Close connection after reading half of the request body (if present). */ object DisconnectDuringRequestBody : SocketPolicy
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 4.6K bytes - Viewed (0) -
src/compress/gzip/gzip_test.go
t.Fatal("Flush didn't flush any data") } if err := w.Close(); err != nil { t.Fatal(err) } } // Multiple gzip files concatenated form a valid gzip file. func TestConcat(t *testing.T) { var buf bytes.Buffer w := NewWriter(&buf) w.Write([]byte("hello ")) w.Close() w = NewWriter(&buf) w.Write([]byte("world\n")) w.Close() r, err := NewReader(&buf) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 17:10:06 UTC 2024 - 6K bytes - Viewed (0)