-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thread Safety Analysis of Shared Memory APIs #909
Comments
Hello, @owny990312 ! SHM Api is marked unstable and thus we are still polishing it. Your question raises a good point to improve, thank you |
Thanls for your reply. How to set its provider's backend, if we use
it means we set general-purpose PosixShmProviderBackend ? |
Yes, here you are using our general-purpose POSIX backed. And It is guaranteed (now and in the future) to be everything-safe |
Thanks for your reply |
@owny990312 However, if your system design might produce high contention around the provider (a lot of overlapping concurrent calls of it's API), maybe it is worth thinking about having a provider's instance per thread, otherwise the contention might degrade the performance. We have plans to optimize our default provider, and these plans also include good improvements for described scenario, but currently it is not perfect |
Describe the feature
Describe the feature
The question concerns the thread safety of shared memory interface APIs, specifically:
z_shm_provider_garbage_collect
z_shm_provider_defragment
z_shm_provider_alloc
z_publisher_put
In a multi-threaded environment where multiple publishers with the same topic are publishing data, are these APIs thread safe?
The text was updated successfully, but these errors were encountered: