Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for closeFn (0.28 sec)

  1. src/database/sql/sql_test.go

    	if !waitCondition(t, func() bool {
    		rows.closemu.RLock()
    		defer rows.closemu.RUnlock()
    		return rows.closed
    	}) {
    		t.Fatal("failed to close rows")
    	}
    }
    
    // TestQueryContextWait ensures that rows and all internal statements are closed when
    // a query context is closed during execution.
    func TestQueryContextWait(t *testing.T) {
    	db := newTestDB(t, "people")
    	defer closeDB(t, db)
    	prepares0 := numPrepares(t, db)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  2. src/database/sql/sql.go

    	// and exclusively during close.
    	//
    	// closemu guards lasterr and closed.
    	closemu sync.RWMutex
    	lasterr error // non-nil only if closed is true
    	closed  bool
    
    	// closemuScanHold is whether the previous call to Scan kept closemu RLock'ed
    	// without unlocking it. It does that when the user passes a *RawBytes scan
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. src/reflect/value.go

    			}
    			rc.ch = ch.pointer()
    			rc.typ = toRType(&tt.Type)
    			rc.val = unsafe_New(tt.Elem)
    		}
    	}
    
    	chosen, recvOK = rselect(runcases)
    	if runcases[chosen].dir == SelectRecv {
    		tt := (*chanType)(unsafe.Pointer(runcases[chosen].typ))
    		t := tt.Elem
    		p := runcases[chosen].val
    		fl := flag(t.Kind())
    		if t.IfaceIndir() {
    			recv = Value{t, p, fl | flagIndir}
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  7. pkg/kubelet/eviction/eviction_manager_test.go

    	}
    
    	// verify the right pod was killed with the right grace period.
    	if podKiller.pod != podToEvict {
    		t.Errorf("Manager chose to kill pod: %v, but should have chosen %v", podKiller.pod.Name, podToEvict.Name)
    	}
    	if podKiller.gracePeriodOverride == nil {
    		t.Errorf("Manager chose to kill pod but should have had a grace period override.")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 23:14:12 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  8. cmd/admin-handlers.go

    		if err != nil {
    			bugLogIf(ctx, stream.AddError(err.Error()))
    			return
    		}
    		addErr = func(msg string) {
    			inspectZipW.Close()
    			encStream.Close()
    			stream.AddError(msg)
    		}
    		defer encStream.Close()
    
    		inspectZipW = zip.NewWriter(encStream)
    		defer inspectZipW.Close()
    	} else {
    		// Legacy: Remove if we stop supporting inspection without public key.
    		var key [32]byte
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 98K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/runtime/framework_test.go

    }
    
    // TestCloseErrorPlugin implements for Close test.
    type TestCloseErrorPlugin struct {
    	name string
    }
    
    func (pl *TestCloseErrorPlugin) Name() string {
    	return pl.name
    }
    
    var errClose = errors.New("close err")
    
    func (pl *TestCloseErrorPlugin) Close() error {
    	return errClose
    }
    
    // TestPreFilterPlugin only implements PreFilterPlugin interface.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 103K bytes
    - Viewed (0)
  10. 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)
Back to top