Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 414 for closeFn (0.14 sec)

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

      }
    
      public void testCopyToAppendable_doesNotCloseIfWriter() throws IOException {
        TestWriter writer = new TestWriter();
        assertFalse(writer.closed());
        source.copyTo(writer);
        assertFalse(writer.closed());
      }
    
      public void testClosesOnErrors_copyingToCharSinkThatThrows() {
        for (TestOption option : EnumSet.of(OPEN_THROWS, WRITE_THROWS, CLOSE_THROWS)) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. internal/grid/muxclient.go

    func (m *muxClient) doPing(respHandler chan<- Response) (ok bool) {
    	m.respMu.Lock()
    	if m.closed {
    		m.respMu.Unlock()
    		// Already closed. This is not an error state;
    		// we may just be delivering the last responses.
    		return true
    	}
    
    	// Only check ping when not closed.
    	if got := time.Since(time.Unix(0, atomic.LoadInt64(&m.LastPong))); got > m.clientPingInterval*2 {
    		m.respMu.Unlock()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  3. src/database/sql/convert.go

    			}
    			rows.closemu.Lock()
    			*d = Rows{
    				dc:          rows.dc,
    				releaseConn: func(error) {},
    				rowsi:       s,
    			}
    			// Chain the cancel function.
    			parentCancel := rows.cancel
    			rows.cancel = func() {
    				// When Rows.cancel is called, the closemu will be locked as well.
    				// So we can access rs.lasterr.
    				d.close(rows.lasterr)
    				if parentCancel != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/ztunnelserver.go

    		pods: pods,
    	}, nil
    }
    
    func (z *ztunnelServer) Close() error {
    	return z.listener.Close()
    }
    
    func (z *ztunnelServer) Run(ctx context.Context) {
    	context.AfterFunc(ctx, func() { _ = z.Close() })
    
    	for {
    		log.Debug("accepting conn")
    		conn, err := z.accept()
    		if err != nil {
    			if errors.Is(err, net.ErrClosed) {
    				log.Debug("listener closed - returning")
    				return
    			}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 22:07:03 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  5. src/syscall/syscall_linux_test.go

    		// We use syscall.Read directly to avoid the poller.
    		// This will return when the write side is closed.
    		n, err := syscall.Read(int(rd.Fd()), data)
    		if !(n == 0 && err == nil) {
    			t.Errorf("expected read to return 0, got %d, %s", n, err)
    		}
    
    		// Clean up rd and also ensure rd stays reachable so
    		// it doesn't get closed by GC.
    		rd.Close()
    		wg.Done()
    	}()
    	<-ready
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/Range.java

       * returned range is {@linkplain BoundType#CLOSED closed} on both ends.
       *
       * @since 14.0
       */
      public static <C extends Comparable<?>> Range<C> singleton(C value) {
        return closed(value, value);
      }
    
      /**
       * Returns the minimal range that {@linkplain Range#contains(Comparable) contains} all of the
       * given values. The returned range is {@linkplain BoundType#CLOSED closed} on both ends.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

      override fun request(): Request = originalRequest
    
      /**
       * Immediately closes the socket connection if it's currently held. Use this to interrupt an
       * in-flight request from any thread. It's the caller's responsibility to close the request body
       * and response body streams; otherwise resources may be leaked.
       *
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  8. src/os/exec/exec_test.go

    			t.Errorf("iteration %d, process B got:\n%s\nwant:\n%s\n", i, got, want)
    		}
    		la.Close()
    		lb.Close()
    		for _, f := range ca.ExtraFiles {
    			f.Close()
    		}
    		for _, f := range cb.ExtraFiles {
    			f.Close()
    		}
    	}
    }
    
    type delayedInfiniteReader struct{}
    
    func (delayedInfiniteReader) Read(b []byte) (int, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 48.4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

            @Throws(IOException::class)
            override fun close() {
              if (!cacheRequestClosed &&
                !discard(ExchangeCodec.DISCARD_STREAM_TIMEOUT_MILLIS, MILLISECONDS)
              ) {
                cacheRequestClosed = true
                cacheRequest.abort()
              }
              source.close()
            }
          }
    
        val contentType = response.header("Content-Type")
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Fri Mar 22 07:09:21 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  10. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/DefaultExclusiveCacheAccessCoordinatorTest.groovy

            _ * lock.state
            0 * _._
    
            when:
            access.close()
    
            then:
            _ * lock.state
            1 * cleanupExecutor.cleanup()
            1 * lock.close()
            0 * _._
        }
    
        def "acquires lock on open and releases on close when lock mode is exclusive"() {
            def access = newAccess(Exclusive)
    
            when:
            access.open()
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 24K bytes
    - Viewed (0)
Back to top