-
Notifications
You must be signed in to change notification settings - Fork 143
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
Implement async lock support #150
Comments
v4 wasn't supposed to use locks. But it had to be turned into a maintenance release based on v3 to fix some API warts since RL has kept be busy from finishing my rework of it. |
Do you have any documentation as to how the next version of DashMap will be lock free? Will it be based on CTries? |
The original idea was to use https://github.com/xacrimon/flize ; but it looks like that's not going to happen now, as the repo is archived. |
It looks like it's no longer archived and it had some changes a few weeks ago. @xacrimon, would you be able to elucidate the development on the lockless version of dashmap? This is a feature I am very much looking forward to. |
@exadyne @vicky5124 Heyo, yeah I recently prepped flize a bit. I still want to make a lockless dashmap but the work required is enourmous and I am someone with a very packed schedule. So the status is that I have planned it but I cannot promise any dates whatsoever. I don’t do this for a living so it’s second priority at best in my life. |
Renamed the issue as v5 is out. I will keep this open but in the meantime, try_* functionality has been added to master and will be in a v5 point release today. This isn't a solution but may serve a temp fix. In general though, I suggest not keeping refs across await points and sync locks are also fine to use in async as per tokio docs. |
The `chashmap` dependency has lead to dependabot alerting[1] about a vulnerability in a transitive dependency. Looking at `chashmap`'s repository it looks to me like it's not very well maintained. On the other hand, `dashmap` looks great and should be a good replacement for `chashmap` and `chashmap-async`. Even though `dashmap` does not yet support async locks[2], the maintainer states that synchronous locks "are also fine to use in async as per tokio docs"[3]. [1]: https://github.com/itchysats/itchysats/security/dependabot/35. [2]: xacrimon/dashmap#150. [3]: xacrimon/dashmap#150 (comment).
3003: Replace `chashmap` with `dashmap` r=luckysori a=luckysori The `chashmap` dependency has lead to dependabot alerting<sup>[1]</sup> about a vulnerability in a transitive dependency. Looking at `chashmap`'s repository it looks to me like it's not very well maintained. On the other hand, `dashmap` looks great and should be a good replacement for `chashmap` and `chashmap-async`. Even though `dashmap` does not yet support async locks<sup>[2]</sup>, the maintainer states that synchronous locks "are also fine to use in async as per tokio docs"<sup>[3]</sup>. [1]: https://github.com/itchysats/itchysats/security/dependabot/35. [2]: xacrimon/dashmap#150. [3]: xacrimon/dashmap#150 (comment). --- Fixes https://github.com/itchysats/itchysats/security/dependabot/35. Co-authored-by: Lucas Soriano del Pino <[email protected]>
we can’t hold a reference to a dashmap item during an await see xacrimon/dashmap#150
In issue #86 you mentioned that v4 wouldn't use locks at all. I'm a bit confused on this, this it seems there's still R/W locks being used in the code for the functions. Are locks still being used? If so, would it be possible to add support for asynchronous locks?
The text was updated successfully, but these errors were encountered: