Comments (5)
Hi, sorry for the "delay" since the last activity on this. I now got the chance to take a look at the sento crate and I dont think that would currently fit into the approach here, as you cant get a "snapshot" of the currently acquired elements.
If I am not missing anything here, I will probably look into continue rolling a custom linked list here that supports the snapshots we would need or we could adapt the sento crate, but I am not sure that would be the right way about this.
from left-right.
After looking at the Code more closely, I also found that it uses the std::Mutex
for epochs and I dont really know how we can adjust that without adding a new dependency like spin which I would like to avoid for now. Any ideas would be welcome
from left-right.
It'd definitely be nice if left-right
could work in a no_std
environment! For yielding, I think the function pointer approach is a good one. For the Mutex
, I wonder if the way to go about it is the disallow creating a dynamic number of read/write handles, and instead have a constructor that takes a const generic <const R: usize>
of the number of read handles to create, and then back it by an R
-length array. The Mutex
is only there to allow new handles to be added on the fly. Now, having both the dynamic and non-dynamic versions co-exist may end up being a little tricky, but I think it's probably doable.
from left-right.
Although the Array approach could definetly work I dont know if it may be too restrictive because you may not know how many readers there will be.
One quick thought I had was maybe using a "simple" lock free linked list, which could only grow or entries could be set to "free/vacant" to allow new read handles to pick them up again. This way we could have an unlimited number of Handles will still avoiding the Lock, however Im not sure if this would work with the writer as it can take like a "snapshot" and see all the read handles, but that may be fine because if a new one gets added while looking through the entries it should already see the new Pointer as well and therefore be save, but this definitely needs some more thought put into it.
Otherwise I could probably already start with some of the other changes and see how that looks in the meantime
from left-right.
Hmm, I think that could work, since the tail of the list still represents a snapshot. I'm imagining a lock free linked list where new ones are always added at the head — then to take a snapshot the writer simply reads the current head and iterates on the list from there and onwards. We may need to do some due diligence to make sure we get the right semantics, but on the surface it looks like a reasonable approach!
from left-right.
Related Issues (20)
- i saw the presentation, will it take a lot of CPU like spinlock while write is waiting? HOT 1
- Why you dont use Crossbeam Epoch?? i have question about this please help HOT 1
- Recoverable errors from fallible operation HOT 5
- Memory bloat when using with async runtime HOT 2
- Possible to shallowcopy a HashMap HOT 1
- #[derive(ShallowCopy)] has prohibitive "T: ShallowCopy" bound HOT 4
- Thread Safety Error on ReadHandler HOT 3
- Why not make `map_ref` of `ReadGuard` public? HOT 1
- Recreating WriteHandle after its dropped HOT 2
- RFC: Hash and Eq requirement for values HOT 4
- Replace Clone bound with Freeze HOT 4
- Possible UB from Box<T> aliasing HOT 7
- data races due to incorrect `Send + Sync` bounds HOT 3
- Relaxation of epoch invariant HOT 2
- rollback HOT 5
- Switch oplog to VecDeque HOT 1
- A potential alternative to epochs, if it works HOT 1
- can DropBehavior have an associated constant instead of a function HOT 11
- Is there a way to get the backing data structure out? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from left-right.