C++ Intel TBB need help with concurrency control

Closed Posted 6 years ago Paid on delivery
Closed Paid on delivery

I have a basic websocket server implemented in C++.

I'm using Intel TBB's concurrent hash_map to store all the users, uniquely identified by the id.

The concurrent hash map will hold a key value pair of <int> and <std::set<string>> where the int is the user's id, and the <std::set<string>> is a set of all instances of the user. For example, the same user user will have the same id say #50, but this user may be connected using multiple devices, such as phone or tablet etc.

so the hash_map will look like this

hash map: {

50: ["user50_pc", "user50_desktop"]...etc,

51: ["user51_mobile..."] etc

}

When the set is empty, it must be deleted using the c++ delete keyword, and the key (50 or 51) must be deleted in the hash

This is all being executed in concurrently with multiple threads.

I've done the code to work for one thread, but I need help getting it to work using multiple threads.

Also need performance improvements.

Only comment if you used intel tbb before.

Thanks

C++ Programming

Project ID: #15242497

About the project

3 proposals Remote project Active 6 years ago

3 freelancers are bidding on average $48 for this job

hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ More

$80 AUD in 1 day
(94 Reviews)
6.6
martinrisa1

Hi, I am professional freelancer and student of theoretic informatics, I have several experience with Intel's TBB library. can you please sned me the whole code? Relevant Skills and Experience C++ Programming Propose More

$50 AUD in 0 days
(6 Reviews)
3.3
xinyusoc

I am pretty sure i can do this in a better way rather than tbb.

$15 AUD in 1 day
(0 Reviews)
0.0