Skip to content
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

feature request:support cancellable RwLock APIs #65

Open
sammyne opened this issue Nov 17, 2023 · 1 comment
Open

feature request:support cancellable RwLock APIs #65

sammyne opened this issue Nov 17, 2023 · 1 comment

Comments

@sammyne
Copy link

sammyne commented Nov 17, 2023

For example,

pub fn RwLockUpgradableReadGuardArc::upgrade(guard: Self) -> UpgradeArc<T>

implemented as

pub fn RwLockUpgradableReadGuardArc::upgrade(guard: Self, cancel: impl Future<Output=()>) -> UpgradeArc<T>

When cancel return Ready, just return UpgradeArc untouched.

@notgull
Copy link
Member

notgull commented Nov 17, 2023

I like the idea in theory but in practice the API would need a better design.

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

No branches or pull requests

2 participants