Comments (4)
I spoke with someone who heavily use flock for multiprocessing, seems ok.
For my use case, it will be perfect. Thanks for this neat lib :)
from rustbreak.
It is indeed not multi-process safe. Since I didn't have that use-case, and implementing it seemed to be difficult. So as not to make any guarantees the whole DB is locked.
If there are any suggestions on how to make this work better, I'm open.
from rustbreak.
I made a simple test with two processes opening a db, the lock seems to work but do you thing fs2/flock would fail at locking the file ? If not, that's ok for me to be used as is and I agree that locking can be hard to manage.
from rustbreak.
I have not noticed it failing to lock so far, although my usage has not been heavily multi-processes. It is mostly as a simple safeguard against accidentally writing concurrently to a file.
from rustbreak.
Related Issues (20)
- Missing detailed information from the back-end HOT 2
- Errors with newest stable Rust HOT 5
- Problems with Ron and json Value integers HOT 6
- Load performance problems HOT 15
- [FR] we should be able to minify the output HOT 6
- Bincode not loading in v2 rc3 HOT 14
- Database::try_read() HOT 2
- FileBackend::from_file / Database::from_file docs missing: Does it load()? HOT 2
- Loading database with empty File fails HOT 18
- Update RON HOT 1
- Transition to Rust edition 2018
- Use `data.read()` instead of `data.write()` in `save()` HOT 1
- Describing generic database HOT 6
- Run `cargo fmt` HOT 1
- More checks in CI HOT 3
- UB with yaml DeSer HOT 5
- RUSTSEC-2020-0077: memmap is unmaintained
- Out of memory if file size > memory size HOT 1
- support speedy https://docs.rs/speedy/ HOT 1
- wasm support + wasi support
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 rustbreak.