Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for putConnHook (0.13 sec)

  1. src/database/sql/sql.go

    		createdAt:  nowFunc(),
    		returnedAt: nowFunc(),
    		ci:         ci,
    		inUse:      true,
    	}
    	db.addDepLocked(dc, dc)
    	db.mu.Unlock()
    	return dc, nil
    }
    
    // putConnHook is a hook for testing.
    var putConnHook func(*DB, *driverConn)
    
    // noteUnusedDriverStatement notes that ds is no longer used and should
    // be closed whenever possible (when c is next not in use), unless c is
    // already closed.
    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

    	getFreedFrom := func(c dbConn) string {
    		mu.Lock()
    		defer mu.Unlock()
    		return freedFrom[c]
    	}
    	setFreedFrom := func(c dbConn, s string) {
    		mu.Lock()
    		defer mu.Unlock()
    		freedFrom[c] = s
    	}
    	putConnHook = func(db *DB, c *driverConn) {
    		if slices.Contains(db.freeConn, c) {
    			// print before panic, as panic may get lost due to conflicting panic
    			// (all goroutines asleep) elsewhere, since we might not unlock
    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