Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 1,957 for closeFn (0.12 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/rpc/server.go

    func (c *gobServerCodec) Close() error {
    	if c.closed {
    		// Only call c.rwc.Close once; otherwise the semantics are undefined.
    		return nil
    	}
    	c.closed = true
    	return c.rwc.Close()
    }
    
    // ServeConn runs the server on a single connection.
    // ServeConn blocks, serving the connection until the client hangs up.
    // The caller typically invokes ServeConn in a go statement.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/wait/backoff.go

    // closed. Pass NeverStop to if you don't want it stop.
    func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) {
    	BackoffUntil(f, NewJitteredBackoffManager(period, jitterFactor, &clock.RealClock{}), sliding, stopCh)
    }
    
    // BackoffUntil loops until stop channel is closed, run f every duration given by BackoffManager.
    //
    // If sliding is true, the period is computed after f runs. If it is false then
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 19:14:11 UTC 2023
    - 16.5K bytes
    - Viewed (0)
  4. 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)
  5. src/time/sys_windows.go

    			err = syscall.ENOENT
    		}
    		return 0, err
    	}
    	return uintptr(fd), nil
    }
    
    func read(fd uintptr, buf []byte) (int, error) {
    	return syscall.Read(syscall.Handle(fd), buf)
    }
    
    func closefd(fd uintptr) {
    	syscall.Close(syscall.Handle(fd))
    }
    
    func preadn(fd uintptr, buf []byte, off int) error {
    	whence := seekStart
    	if off < 0 {
    		whence = seekEnd
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 08 17:19:07 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. staging/src/k8s.io/apiserver/pkg/server/routes/debugsocket.go

    // Run starts the server and waits for stopCh to be closed to close the server.
    func (s *DebugSocket) Run(stopCh <-chan struct{}) error {
    	if err := os.Remove(s.path); err != nil && !os.IsNotExist(err) {
    		return fmt.Errorf("failed to remove (%v): %v", s.path, err)
    	}
    
    	l, err := net.Listen("unix", s.path)
    	if err != nil {
    		return fmt.Errorf("listen error (%v): %v", s.path, err)
    	}
    	defer l.Close()
    
    	srv := http.Server{Handler: s.mux}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 08 00:33:16 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  10. platforms/core-execution/build-cache/src/main/java/org/gradle/caching/internal/controller/service/LoadTarget.java

            Closer closer = Closer.create();
            closer.register(input);
            try {
                if (loaded) {
                    throw new IllegalStateException("Build cache entry has already been read");
                }
                Files.asByteSink(file).writeFrom(input);
                loaded = true;
            } catch (Exception e) {
                throw closer.rethrow(e);
            } finally {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:43:12 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top