Git Product home page Git Product logo

rust-concurrent-hashmap's People

Contributors

arthurprs avatar luminarys avatar pythonesque avatar veddan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rust-concurrent-hashmap's Issues

Update `spin` crate dependency version

We're using cargo audit in our project and today this vulnerability was found:

error: Vulnerable crates found!

ID:	 RUSTSEC-2019-0013
Crate:	 spin
Version: 0.4.8
Date:	 2019-08-27
URL:	 https://github.com/mvdnes/spin-rs/issues/65
Title:	 Wrong memory orderings in RwLock potentially violates mutual exclusion
Solution: upgrade to: >= 0.5.2

I will fork the project and try to see if just updating spin don't break anything and submit a PR if doesn't.

Add CI

Adding a build status would be good.

Think about recursive locking

Specifically

{
    let accessor = map.find(&x);
    map.insert(y, z);  // Is deadlock OK? What are the properties of std locks?
}

error: Could not compile `spin`

--> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/spin-0.4.6/src/lib.rs:6:30
|
6 | #![cfg_attr(feature = "asm", feature(asm))]
| ^^^^^^^^^^^^^

error: aborting due to previous error

Caused by:
process didn't exit successfully: rustc --crate-name spin /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/spin-0.4.6/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg feature="asm" -C metadata=f0103624a0e8ce52 -C extra-filename=-f0103624a0e8ce52 --out-dir /home/suraj.prakash/projects/payu_concur/target/debug/deps -L dependency=/home/suraj.prakash/projects/payu_concur/target/debug/deps --cap-lints allow (exit code: 101)

Crate cannot be found

This crate cannot be found on crates.io looking for "concurrent hash map". Maybe adding some tag would help.

ConcHashMap<K, V, H>::new() returns ConcHashMap<K, V, RandomState> instead of ConcHashMap<K, V, H>

While experimenting with a non-default hasher and ConcHashMap, I found that the new method doesn't include the hasher in its type signature. As a result, code like the following:

type MyMap = ConcHashMap<(u64, u64), u8>;
...
let x: MyMap = MyMap::new();

doesn't compile because MyMap::new returns a type different than MyMap. This doesn't look intentional and is probably fixed simply by changing the return type of new from ConcHashMap<K, V> to ConcHashMap<K, V, H>.

An easy workaround is to import the Default trait and use MyMap::default() instead of MyMap::new().

Example of Options concurrency

Hi,

Do you have an example on how to use options concurrency, I'd like to increase the 16 to 256 but I can't find a working example, I can't understand the doc properly.

Thank you so much man.

Improve locking performance

RWLocks can be slow, Mutex might be faster. Obviously might depend on read/write ratio. Needs benchmarks.
Last time I checked, lots of time was spent doing virtual calls to access thread-locals (is_panicking) on low-contention scenarios, see rust-lang/rust#25088.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.