Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anishsinha-io/locking-proof-of-concept
https://github.com/anishsinha-io/locking-proof-of-concept
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/anishsinha-io/locking-proof-of-concept
- Owner: anishsinha-io
- Created: 2022-09-06T01:10:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-06T17:05:12.000Z (over 2 years ago)
- Last Synced: 2024-11-08T12:17:49.012Z (3 months ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Locking Proof of Concept
This repository contains a rough proof of concept for how I will implement shared, thread-safe in-memory, internal data structures for managing the concurrency of the Lehman and Yao index.
This small program creates a thread pool and spawns two writers and four readers, all working on the same shared data structure (a simple HashMap) although this can be generalized to any data structure. The HashMap is wrapped in a `RwLock` which is in turn wrapped in an `Arc`.
To run this program, make sure you have the Rust toolchain installed. If the following commands work, you have it installed:
cargo --version
rustc --version
You can download the Rust toolchain from here: [Rust Official Page](https://www.rust-lang.org/tools/install)