-
Notifications
You must be signed in to change notification settings - Fork 12
How to track life cycle of Arc<Database> #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Reading between the lines, does I'd initially suggest looking for any way to avoid doing that, but I assume you've already looked at other options. What you can do here depends on whether you want a If "no", I would suggest having an If "yes", you're in a stickier situation, but I think you can make it work. However, consider the fact that deleting a database requires starting and committing a write transaction. If you already have a write transaction open (retained by the |
Great thanks for detailed explanation. |
I need to track final dropping of
Database
object inArc
. In particular I need delete databases (i.e. by callingDatabase::delete()
) which was removed by the application when all references to it is dead.My idea is a newtype wrapper for
Database
. I created thestruct WrappedDatabase
and implementedDeref
trait for this newtype, but it still doesn't allows me to create cursors usingArc<WrappedDatabase>
because it requires something which implementsInto<Supercow<'a, Database>>
.Are anybody known a right solution?
The text was updated successfully, but these errors were encountered: