Closed minggangw closed 4 years ago
Currently, we are using uv_mutex_lock/uv_mutex_unlock to protect data shared between threads:
https://github.com/RobotWebTools/rclnodejs/blob/326ad707343133b9badaf927c2f8fb0dacc34886/src/handle_manager.hpp#L28-L35
But we could use Read-write locks to make it more efficient.
Currently, we are using uv_mutex_lock/uv_mutex_unlock to protect data shared between threads:
https://github.com/RobotWebTools/rclnodejs/blob/326ad707343133b9badaf927c2f8fb0dacc34886/src/handle_manager.hpp#L28-L35
But we could use Read-write locks to make it more efficient.