Comments (3)
@clalancette thank you very much for the explanation!
To do that, what we need to do is to add a reader/writer lock around the hashmap.
yeah agree, that can be the best performative way. having rwlock object in the hashmap object and issue rwlock depends on the operation to protect the object.
The wrinkle here is that all of this is in C, so we need to come up with some cross-platform way to do this. It needs a bit of thought; we may be able to get away with only using atomics here.
agree, atomic can do the work but not performative in most reading cases as you mentioned. rcutils abstraction rwlock is work though.
btw, AFAIK, mutex and rwlock, these kind of things have never been used in rcutils or rcl before, if i am not mistaken, we tried to avoid these implementation until now? so question is can we actually take this path? i would like to hear from others and history.
from rcutils.
The wrinkle here is that all of this is in C, so we need to come up with some cross-platform way to do this.
btw, AFAIK, mutex and rwlock, these kind of things have never been used in rcutils or rcl before, if i am not mistaken, we tried to avoid these implementation until now?
@fujitatomoya @clalancette
Could this proposal be a valid alternative to avoid having locks at the rcutils/rcl layer and keep them in rclcpp instead?
from rcutils.
btw, AFAIK, mutex and rwlock, these kind of things have never been used in rcutils or rcl before, if i am not mistaken, we tried to avoid these implementation until now?
Yes, we have attempted to keep the locks out of rcutils and rcl prior to this. I think we could take that path, but I think @jrutgeer 's proposal is simpler. I'm going to comment over there as I have a couple of thoughts.
from rcutils.
Related Issues (20)
- Calculate the size of the specified directory (include subdirectory) HOT 13
- MSBuild warnings C5105: macro expansion producing 'defined' has undefined behavior HOT 2
- 👩🌾 test_logging_long_messages failing on Dashing HOT 1
- Arch Linux: Compilation error with rcutils in ros2 HOT 5
- cmake warning on OSX: No known linker flag to force library linkage HOT 1
- Warnings while compiling to WebAssembly HOT 2
- error: rcutils/logging_macros.h: No such file or directory HOT 1
- New warning in the packaging linux jobs HOT 3
- logging_macros.h not found HOT 1
- Why does `rcutils_expand_user` fail on non-existent directory? HOT 2
- High logging overhead HOT 5
- AddressSanitizer: new-delete-type-mismatch in rcutils_string_map_fini HOT 3
- Human Readable time in logs HOT 12
- "Failed to find exported target names" error while colcon build HOT 3
- Undefined symbol: rcutils_log_internal HOT 2
- performance_test_fixture not found HOT 4
- Valgrind shows leak in rcutils_load_shared_library HOT 1
- Superfluous `va_copy` call in `rcutils_char_array_vsprintf` HOT 2
- Test failure on nightly_linux_address_sanitizer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcutils.