Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 82 for close1 (0.22 sec)

  1. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

     *
     * <pre>{@code
     * FluentFuture<UserName> userName =
     *     ClosingFuture.submit(
     *             closer -> closer.eventuallyClose(database.newTransaction(), closingExecutor),
     *             executor)
     *         .transformAsync((closer, transaction) -> transaction.queryClosingFuture("..."), executor)
     *         .transform((closer, result) -> result.get("userName"), directExecutor())
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 12:37:15 UTC 2024
    - 98.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/ClosingFuture.java

     *
     * <pre>{@code
     * FluentFuture<UserName> userName =
     *     ClosingFuture.submit(
     *             closer -> closer.eventuallyClose(database.newTransaction(), closingExecutor),
     *             executor)
     *         .transformAsync((closer, transaction) -> transaction.queryClosingFuture("..."), executor)
     *         .transform((closer, result) -> result.get("userName"), directExecutor())
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 98.7K bytes
    - Viewed (0)
  3. src/net/http/serve_test.go

    			}
    			t.Cleanup(func() { bresp.Body.Close() })
    
    			// Try to cause a race. Canceling the client request will cause the client
    			// transport to close req2.Body. Returning from the server handler will
    			// cause the server to close req.Body. Since they are the same underlying
    			// ReadCloser, that will result in concurrent calls to Close (and possibly a
    			// Read concurrent with a Close).
    			if mode == http2Mode {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  4. src/database/sql/sql_test.go

    	}
    	dc := db.freeConn[0]
    	if dc.closed {
    		t.Errorf("conn shouldn't be closed")
    	}
    
    	if n := len(dc.openStmt); n != 1 {
    		t.Errorf("driverConn num openStmt = %d; want 1", n)
    	}
    	err = db.Close()
    	if err != nil {
    		t.Errorf("db Close = %v", err)
    	}
    	if !dc.closed {
    		t.Errorf("after db.Close, driverConn should be closed")
    	}
    	if n := len(dc.openStmt); n != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  5. src/database/sql/sql.go

    	si          driver.Stmt
    	closed      bool
    	closeErr    error // return value of previous Close call
    }
    
    // Close ensures driver.Stmt is only closed once and always returns the same
    // result.
    func (ds *driverStmt) Close() error {
    	ds.Lock()
    	defer ds.Unlock()
    	if ds.closed {
    		return ds.closeErr
    	}
    	ds.closed = true
    	ds.closeErr = ds.si.Close()
    	return ds.closeErr
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
  6. src/net/http/transport_test.go

    		io.Copy(io.Discard, r.Body)
    	})).ts
    
    	c := ts.Client()
    
    	closes := 0
    
    	res, err := c.Post(ts.URL, "text/plain", countCloseReader{&closes, strings.NewReader("hello")})
    	if err != nil {
    		t.Fatal(err)
    	}
    	res.Body.Close()
    	if closes != 1 {
    		t.Errorf("closes = %d; want 1", closes)
    	}
    }
    
    func TestTransportTLSHandshakeTimeout(t *testing.T) {
    	defer afterTest(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  7. src/net/http/server.go

    	listenerGroup sync.WaitGroup
    }
    
    // Close immediately closes all active net.Listeners and any
    // connections in state [StateNew], [StateActive], or [StateIdle]. For a
    // graceful shutdown, use [Server.Shutdown].
    //
    // Close does not attempt to close (and does not even know about)
    // any hijacked connections, such as WebSockets.
    //
    // Close returns any error returned from closing the [Server]'s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CallTest.kt

        callback.await(server.url("/a")).assertFailure("Canceled", "Socket closed", "Socket is closed")
      }
    
      @Test
      fun cancelAll() {
        val call = client.newCall(Request(server.url("/")))
        call.enqueue(callback)
        client.dispatcher.cancelAll()
        callback.await(server.url("/")).assertFailure("Canceled", "Socket closed", "Socket is closed")
      }
    
      @Test
      fun cancelWhileRequestHeadersAreSent() {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go

    }
    
    type SimpleStream struct {
    	version     string
    	accept      string
    	contentType string
    	err         error
    
    	io.Reader
    	closed bool
    }
    
    func (s *SimpleStream) Close() error {
    	s.closed = true
    	return nil
    }
    
    func (s *SimpleStream) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
    func (s *SimpleStream) DeepCopyObject() runtime.Object {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 20:15:22 UTC 2023
    - 158.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

       * characters can be read, the remaining characters are returned and the stream is closed.
       */
      private fun readAscii(
        inputStream: InputStream,
        count: Int,
      ): String {
        val result = StringBuilder()
        for (i in 0 until count) {
          val value = inputStream.read()
          if (value == -1) {
            inputStream.close()
            break
          }
          result.append(value.toChar())
        }
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
Back to top