Coder Social home page Coder Social logo

Bug in lock-free sofi about iceoryx HOT 4 OPEN

elfenpiff avatar elfenpiff commented on June 5, 2024
Bug in lock-free sofi

from iceoryx.

Comments (4)

budrus avatar budrus commented on June 5, 2024

@elfenpiff This also assumes that there are multiple pushers. SOFI was designed for SPSC. All we said way that by accident is could also be SPMC, but we never had MPMC in mind

from iceoryx.

elBoberido avatar elBoberido commented on June 5, 2024

Yes, this is not an issue for iceoryx1 since there is a Mutex in the ChunkDistributor which takes care of the synchronization. The queue is used as expected and guarded by a Mutex in the non-spsc case.

I would not complicate the code just catch a misuse.

from iceoryx.

elBoberido avatar elBoberido commented on June 5, 2024

Well, there is one valid use case and we need to decide whether we want to support it. If one could guarantee that no concurrent pushes happen but still multiple producer threads access the SOFI, e.g. by exchanging an access token via a relaxes atomic, the synchronization of m_data is required. The question is whether this should be the task of the SOFI of the task of the mechanism which ensures that there is no concurrent access of multiple producer/consumer.

from iceoryx.

elBoberido avatar elBoberido commented on June 5, 2024

@elfenpiff @budrus do you agree to close this issue. From my point of view this is not a bug since the SpscSofi is, as the name suggests, a single producer single consumer queue. If used in a multi pusher context, it needs to be guarded with a mutex (or different synchronization mechanism), like it is done in the ChunkDistributor where a mutex is used to synchronize the access to the data.

from iceoryx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.