Am 14.01.2018 um 22:46 schrieb Nick Sabalausky:

LockedConnection provides access to the underlying Connection via alias
this. And the alias this means LockedConnection can be implicitly
converted to the underlying Connection.

Am I correct in understanding that means it's possible for a
LockedConnection to go out of scope and become re-locked, but then
something that was already holding a reference to its underlying
Connection now has an "illegal" reference to a connection that's been
returned to the pool?

I take it this is something for user code to be careful to avoid?

Hm, you are right, I didn't really realize that. The __conn property
should probably just be changed to return a
vibe.core.concurrency.ScopedRef!Connection instead. That still leaves
a tiny hole, but until DIP1000 has landed, that should be the best
approximation.