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: RwLock #2015

Open
svenknobloch opened this issue Dec 28, 2019 · 9 comments · May be fixed by #2082
Open

Feature: RwLock #2015

svenknobloch opened this issue Dec 28, 2019 · 9 comments · May be fixed by #2082
Labels
A-lock Area: futures::lock C-feature-request

Comments

@svenknobloch
Copy link

Are there any current plans to add a future-aware RwLock to complement the Mutex?

I would be happy to try my hand at an implementation based on the current mutex implementation but would need some input as to the desired reader/writer fairness policy.

@yoshuawuyts
Copy link
Member

async_std::sync::RwLock might serve as a useful reference impl.

@d-e-s-o
Copy link

d-e-s-o commented Feb 11, 2020

Would be great to have such functionality.

@rj-calvin
Copy link

rj-calvin commented Feb 15, 2020

@yoshuawuyts I've looked at their implementation, I think it already shares a number of similarities with futures::lock::Mutex considering that they both use a similar setup for maintaining wakers. The difference is that async_std defines a separate type called WakerSet.

@rj-calvin rj-calvin linked a pull request Feb 16, 2020 that will close this issue
@xpepermint
Copy link

Is there a release milestone?

@ghost
Copy link

ghost commented Aug 19, 2020

@xpepermint You can use https://github.com/stjepang/async-rwlock until a RwLock is added to futures.

@xpepermint
Copy link

I see. Thank you @stjepang

@Enrico2
Copy link

Enrico2 commented Oct 22, 2020

@stjepang Hi, I see that repository no longer exists or is no longer public?

Does anyone know what's the current status of this issue? Thanks.

@Enrico2
Copy link

Enrico2 commented Oct 22, 2020

Oh I see it's at https://github.com/stjepang/async-lock

@rj-calvin
Copy link

rj-calvin commented Oct 24, 2020

@xpepermint @Enrico2 Sorry for the egregious delay. I have a PR (#2082) that is available though I haven't yet gotten any sort of go ahead with its current state. I believe the code should function, in theory, identically to the one provided in https://github.com/stjepang/async-lock.

@taiki-e taiki-e added the A-lock Area: futures::lock label Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lock Area: futures::lock C-feature-request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants