Go SQL Database Thread Safety
2024-11-21
Making use of sql.DB
from multiple goroutines is safe, since Go manages its own internal mutex.1
DB is a database handle representing a pool of zero or more underlying connections. It's safe for concurrent use by multiple goroutines.2