Comments (3)
As the README indicates, it currently offers "fine-grained locking on insert and delete combined with optimistic search" which is why, for example, getPrevElementNodes
does not acquire a lock.
A new version is being tested with streamlined across-the-board optimistic locking via revision number incremented on writes and optionally supplied with write requests -- returning an error when the versions don't match that can be acted upon in the client (à la Elasticsearch). I apologize for the delay in getting the new version on Github, it's part of a larger ongoing project in a private repo.
I'll update this issue when it's merged in to be sure you're notified.
from fast-skiplist.
Hey @sean-public thanks for getting back to me - I don't actually need thread safety for my use, so I'm just stripping out all locking in a fork, but I do want to point this out because I think it's very important. I'd also like to say, that concurrency issues aside, I really like this library - it's a nice implementation with lots of benchmarks and the code is tiny!
Instead of trying to explain in this issue, I've simply made a pull request with a test which shows one of the possible data races happening: #4
This article: https://golang.org/doc/articles/race_detector.html has more information on what precisely constitutes a data race, and why even "innocent" races on primitive types can lead to problems.
from fast-skiplist.
Why was this issue closed? SetMaxLevel isn't documented as thread-unsafe.
from fast-skiplist.
Related Issues (11)
- How to get Element.value?
- Help Needed - Optimistic Locking
- skiplist created with NewWithMaxLevel(19+) panics on Set
- Rare panic for high loads HOT 2
- i hava a test to show. skiplist is not fast! HOT 3
- Unnecessary lock? and other changes in forks HOT 1
- What are the guarantees when iterating with Front() and Next()? HOT 1
- SetMaxLevel can alter existing data? HOT 1
- Question about locking claims in readme HOT 1
- How does this compare to Go's map? HOT 1
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 fast-skiplist.