Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for putConn (0.08 sec)

  1. src/database/sql/sql.go

    			ds.Close()
    		}
    	}
    }
    
    // debugGetPut determines whether getConn & putConn calls' stack traces
    // are returned for more verbose crashes.
    const debugGetPut = false
    
    // putConn adds a connection to the db's free pool.
    // err is optionally the last error that occurred on this connection.
    func (db *DB) putConn(dc *driverConn, err error, resetSession bool) {
    	if !errors.Is(err, driver.ErrBadConn) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
  2. src/database/sql/sql_test.go

    			waitingForConn := make(chan struct{})
    
    			go func() {
    				defer close(afterPutConn)
    
    				conn, err := db.conn(ctx, alwaysNewConn)
    				if err == nil {
    					db.putConn(conn, err, false)
    				} else {
    					t.Errorf("db.conn: %v", err)
    				}
    			}()
    			go func() {
    				defer close(waitingForConn)
    
    				for {
    					if t.Failed() {
    						return
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
Back to top