Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for connectionCleanerRunLocked (0.37 sec)

  1. src/database/sql/sql.go

    			return
    		}
    
    		d, closing := db.connectionCleanerRunLocked(d)
    		db.mu.Unlock()
    		for _, c := range closing {
    			c.Close()
    		}
    
    		if d < minInterval {
    			d = minInterval
    		}
    
    		if !t.Stop() {
    			select {
    			case <-t.C:
    			default:
    			}
    		}
    		t.Reset(d)
    	}
    }
    
    // connectionCleanerRunLocked removes connections that should be closed from
    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

    			0,
    		},
    		{
    			// Want to close some connections via max idle time and one by max lifetime.
    			time.Millisecond,
    			// nowFunc() - MaxLifetime should be 1 * time.Nanosecond in connectionCleanerRunLocked.
    			// This guarantees that first opened connection is to be closed.
    			// Thus it is timeOffset + secondTimeOffset + 3 (+2 for Close while reusing conns and +1 for Conn).
    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