Skip to content

Track all connection is dropped in deadpool-sqlite#469

Open
xuxiaocheng0201 wants to merge 4 commits intodeadpool-rs:mainfrom
xuxiaocheng0201:main
Open

Track all connection is dropped in deadpool-sqlite#469
xuxiaocheng0201 wants to merge 4 commits intodeadpool-rs:mainfrom
xuxiaocheng0201:main

Conversation

@xuxiaocheng0201
Copy link
Copy Markdown
Contributor

@xuxiaocheng0201 xuxiaocheng0201 commented Feb 22, 2026

Fixes #330
Fixes #468

@xuxiaocheng0201 xuxiaocheng0201 marked this pull request as draft February 23, 2026 06:48
@xuxiaocheng0201 xuxiaocheng0201 marked this pull request as ready for review February 23, 2026 15:05
@bikeshedder
Copy link
Copy Markdown
Collaborator

Awesome! ❤️

Even though I'd prefer if it was actually a feature of deadpool itself. I'll have to tinker with this a bit. I'll look into that very soon. 👍

@bikeshedder bikeshedder added enhancement New feature or request A-sqlite Area: SQLite / deadpool-sqlite labels Feb 23, 2026
@bikeshedder
Copy link
Copy Markdown
Collaborator

I did not forget about this PR. I just want to push this to the deadpool crate rather than making this a deadpool-sqlite exclusive feature.

@xuxiaocheng0201
Copy link
Copy Markdown
Contributor Author

We cannot directly track whether M::Type in Object<M> has indeed been dropped, as it is usually an external type and may not necessarily implement Drop. My solution is to track deadpool_sync::SyncWrapper, because only it is controllable, so this may not generalize to the entire deadpool, but only to all managers who use SyncWrapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-sqlite Area: SQLite / deadpool-sqlite enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deadpool-sqlite: Track object drop. Block on dropping SyncWrapper.

2 participants