What level of expertise would it take to solve the following problem ?

Implement an STL compliant container called concurrent_unordered_map<class Key, class T, class Hash, class Pred, class Alloc> using as much of the C++ 11, STL and/or the Boost C++ libraries as possible which provides the same facilities as std::unordered_map<class Key, class T, class Hash, class Pred, class Alloc> (or boost::unordered_map) but is:

1. Thread safe to use from multiple threads.

2. Must implement constructor, copy constructor, copy assignment, move constructor, move assignment, destructor, find, insert, erase (when key is passed) and erase (when iterator is passed).

3. The above implementations should be somewhat used concurrently, in parallel by multiple threads.

4. You need NOT implement rehash() nor reserve() or any form of bucket resizing. I also don’t mind if you skip const iterator implementation.

5. You CAN use std::unordered map<> if you wish.

6. As with all STL container implementations, the Abrahams exception safety guarantees must be followed
Duplications:
https://stackoverflow.com/questions/28936673/what-level-of-expertise-would-it-take-to-implement-the-following-in-c
https://www.quora.com/What-level-of-expertise-would-be-required-to-implement-the-following-in-C++-Who-can-implement-it-in-1-hour


You really just need to know how to use the C++ Standard Library effectively. (The STL is not the C++ Standard Library, but it is usually wrongly used to mean such). Based on point #5, it looks like you could just write a wrapper (which would be easy to do, but not as efficient - you would optimize it later on in development if it turned out to be a problem).
Topic archived. No new replies allowed.