Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for close1 (0.15 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. pkg/controller/garbagecollector/garbagecollector_test.go

    	//    wait.Until() loops with `period` until the `stopCh` is closed :
    	//        wait.PollImmediateUntil() loops with 100ms (hardcode) util the `stopCh` is closed:
    	//            GetDeletableResources()
    	//            gc.resyncMonitors()
    	//            cache.WaitForNamedCacheSync() loops with `syncedPollPeriod` (hardcoded to 100ms), until either its stop channel is closed after `period`, or all caches synced.
    	//
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  10. cmd/metrics-v2.go

    		for _, mf := range mfs {
    			if err := enc.Encode(mf); err != nil {
    				// client may disconnect for any reasons
    				// we do not have to log this.
    				return
    			}
    		}
    		if closer, ok := enc.(expfmt.Closer); ok {
    			closer.Close()
    		}
    	})
    }
    
    func metricsBucketHandler() http.Handler {
    	return metricsHTTPHandler(bucketCollector, "handler.MetricsBucket")
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 22:26:54 UTC 2024
    - 131.9K bytes
    - Viewed (0)
Back to top