Details
-
Improvement
-
Resolution: Fixed
-
Major
-
master
Description
The AtomicUnorderedMap could benefit from shared_locking for the management of map membership, for example size/find/empty can use shared_lock whilst erase/insert can use exclusive locking.
This improvement becomes more useful as the for_each style methods do more work, e.g. the function object which executes under the lock is more expensive. At the moment for_each would execute serially, even if different keys were used, whilst with shared locking they could execute concurrently.
The objects in the map are assumed to themselves be independently 'thread-safe' (e.g. ActiveStream). The AtomicUnorderedMap mutex is assumed to exist for correct/consistent management of the map itself