robotology / wearables

Data collection framework for wearable sensors
BSD 3-Clause "New" or "Revised" License
19 stars 11 forks source link

Use std::mutex instead of std::recursive_mutex in IWearRemapper #174

Closed RiccardoGrieco closed 1 year ago

RiccardoGrieco commented 1 year ago

This PR introduces the following 2 changes in IWearRemapper:

lrapetti commented 1 year ago

@RiccardoGrieco let me know when the PR is ready to be checked (in latest tests was not working properly)

RiccardoGrieco commented 1 year ago

As per discussion with @lrapetti we will implement the following changes:

RiccardoGrieco commented 1 year ago

With b0d1127 I also switched from std::map to std::unordered_map. The first one has an access time that is O(log(n)) w.r.t. the number of sensor, while the second one's access time is O(1). Since we do not have cases where the order is important, it seems safe to me to switch to that one.

RiccardoGrieco commented 1 year ago

Thanks @lrapetti, merging.