GetNetConn safely returns the current network connection using atomic load (lock-free). This method is used by the pool for health checks and provides better performance.
()
| 666 | // GetNetConn safely returns the current network connection using atomic load (lock-free). |
| 667 | // This method is used by the pool for health checks and provides better performance. |
| 668 | func (cn *Conn) GetNetConn() net.Conn { |
| 669 | return cn.getNetConn() |
| 670 | } |
| 671 | |
| 672 | // SetNetConnAndInitConn replaces the underlying connection and executes the initialization. |
| 673 | // This method ensures only one initialization can happen at a time by using atomic state transitions. |
no test coverage detected