eclipse-iceoryx / eclipse-iceoryx/iceoryx
Documentation Request: Thread Safety Guarantees for Publisher APIs
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 492
- Avg merge
- 18h 57m
- Merged PRs (30d)
- 1
Description
I'm using the iceoryx publisher APIs and have questions about their thread safety guarantees. Specifically:
### Current Situation
In `UntypedPublisherImpl`, there are three core APIs:
- `loan()`
- `publish()`
- `release()`
However, I couldn't find clear documentation about their thread safety guarantees.
### Questions
1. Are these APIs thread-safe in `UntypedPublisherImpl`?
- Can multiple threads safely call `loan()` concurrently?
- Can multiple threads safely call `publish()` on different chunks concurrently?
- Can multiple threads safely call `release()` on different chunks concurrently?
2. Do these thread safety guarantees (if any) apply to all publisher types in iceoryx?
- TypedPublisher
- PublisherImpl
- Other publisher implementations
3. If these APIs are thread-safe:
- What synchronization mechanism is used internally?
- Are there any performance implications users should be aware of?
- Are there any usage patterns we should avoid?
### Request
Could you please:
1. Clarify the thread safety guarantees for these APIs
2. Update the documentation to explicitly state thread safety guarantees
3. Provide examples of correct multi-threaded usage if applicable
This information would be very helpful for users implementing multi-threaded publishers in their applications.
### Additional Context
- Currently using iceoryx version: 2.0.6
- Use case: Multiple threads publishing data through the same publisher instance
Contributor guide
Research direction
Start with the UntypedPublisherImpl APIs named in the issue: loan(), publish(), and release(), then compare their guarantees with TypedPublisher, PublisherImpl, and other publisher implementations. Document the confirmed concurrency rules, synchronization details, performance implications, and safe usage examples for iceoryx publishers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100