IsUsed returns true if the connection is currently in use (lock-free). Deprecated: Use GetStateMachine().GetState() == StateInUse directly for better clarity. This method is kept for backwards compatibility. A connection is "used" when it has been retrieved from the pool and is actively processing
()
| 354 | // actively processing a command. Background operations (like re-auth) should |
| 355 | // wait until the connection is not used before executing commands. |
| 356 | func (cn *Conn) IsUsed() bool { |
| 357 | return cn.stateMachine.GetState() == StateInUse |
| 358 | } |
| 359 | |
| 360 | // SetUsed sets the used flag for the connection (lock-free). |
| 361 | // |