Comments (5)
@budrus yeah, you are right. I totally overlooked that. this is a complete misuse of the SpscFifo
. @elfenpiff do you have a use case for calling size
or is_full
from another thread than the producer or consumer thread?
from iceoryx.
@elfenpiff I thought SoFi was an overflowing SPSC queue. With this in mind, would it be OK?. I also have doubts about your fix. You still have the problem as the other threads can change the world between the initial write and read position loads, or?
I think the contract has to be that only one thread changes the write position
from iceoryx.
@budrus you misread the issue title. This is related to the FIFO not the SOFI and the SOFI already has the do-while loop. We just need to port it over.
from iceoryx.
Ahh, sorry I was coming from #2160 which is about SOFI. But the name is even SpScFiFo
so we are talking about single producer + single consumer. My definition of this would be a single thread pushing and a single thread poping. Also not allowing the same publisher or subscriber to be used in more than one thread without something like a memory synchronizing mutex
from iceoryx.
@elfenpiff closing this issue since the calling size
and is_full
from a different thread than the producer or consumer thread is not supported, at least not when these are running. The information one obtains from these functions is also absolutely useless in a third thread as long as the producer and/or consumer thread are running. If your use case relates to getting these information when either the producer or consumer thread isn't running anymore, then the current logic is safe to use and does not result in the issue you described.
from iceoryx.
Related Issues (20)
- Span assert does not compile HOT 4
- POPO__CHUNK_LOCKING_ERROR on iox-roudi HOT 3
- Remove warning in toml gateway config parser
- how to run ice_access_control demo HOT 8
- Iceoryx RAW_SOCKET buffer usage HOT 7
- Update links to default branch
- Make iceoryx resource prefix a compile time option
- Fix new clang-tidy-18 warnings
- ICEORYX error! POPO__CHUNK_LOCKING_ERROR HOT 4
- Mark iox container operations which return bool as [[nodiscard]] HOT 1
- 'iox::string' tests can exceed the translation unit compilation timeout
- Prepare v2.0.6 release for ROS2
- Compiler warnings on latest macOS on release_2.0
- sendChunk, releaseChunk latencies HOT 6
- While setting the acquired shared memory to zero a fatal SIGBUS signal appeared caused by memset. HOT 5
- how to support string using zero-copy transport HOT 1
- Add 'iox' prefix to all functions and types in the platform abstraction
- SingleProcess example crashes on QNX HOT 4
- : backtrace: HOT 2
- Is `libatomic` still required to build Iceoryx? HOT 7
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 iceoryx.