Function MySQLPool.lockConnection
Obtain a connection. If one isn't available, a new one will be created.
The connection returned is actually a LockedConnection!Connection
,
but it uses alias this
, and so can be used just like a Connection.
(See vibe.d's
LockedConnection documentation.)
No other fiber will be given this Connection as long as your fiber still holds it.
There is no need to close, release or "unlock" this connection. It is reference-counted and will automatically be returned to the pool once your fiber is done with it.
Prototype
auto LockedConnection!(mysql.connection.Connection) lockConnection();