Is std::unordered_map with infinity max load factor, thread safe for single writer / multiple readers?
I want to lock a mutex before inserting to a std::unordered_map, but refrain from locks when reading this map. I have an upper limit to the number of values that will actually be inserted to the map, so I can set an appropriate bucket number to get decent performance without re-hashing.
Is std::unordered_map with infinity max load factor, thread safe for single writer / multiple readers?
I want to lock a mutex before inserting to a std::unordered_map, but refrain from locks when reading this map. I have an upper limit to the number of values that will actually be inserted to the map, so I can set an appropriate bucket number to get decent performance without re-hashing.
Is std::unordered_map with infinity max load factor, thread safe for single writer / multiple readers?
I want to lock a mutex before inserting to a std::unordered_map, but refrain from locks when reading this map. I have an upper limit to the number of values that will actually be inserted to the map, so I can set an appropriate bucket number to get decent performance without re-hashing.
Is std::unordered_map with infinity max load factor, thread safe for single writer / multiple readers?
I want to lock a mutex before inserting to a std::unordered_map, but refrain from locks when reading this map. I have an upper limit to the number of values that will actually be inserted to the map, so I can set an appropriate bucket number to get decent performance without re-hashing.
Failing to join a thread
I’m making a program that creates some random arrays and then uses two different sorting functions to sort them. First, I create a vector of Fleet objects with different sizes. Then, for each fleet I create an array of threads and in each thread I put a lambda function that copies a fleet and sorts it. It works fine but when it comes to joining threads I get “Process finished with exit code -1073741819 (0xC0000005)”. It successfully joins the first thread but not the second. What might be the problem?