lundi 9 mars 2015

What level of expertise would it take to implement the following in C++?

Implement an STL compliant container called concurrent_unordered_map 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 (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.




Aucun commentaire:

Enregistrer un commentaire