Re: DataObjectLockFree: fix facts in doxygen
Sébastien Barthélémy <[email protected]>
| Newsgroups | gmane.science.robotics.orocos.devel |
|---|---|
| Message-ID | <CAPkDDd7d-T685qYo-_yQORtcYNvmJw5RW+jXMH+USWMLDbEmBw@mail.gmail.com> |
On Tue, Dec 11, 2012 at 3:50 PM, Herman Bruyninckx < [email protected]> wrote: > Anyway, the Lock Free pattern has as pre-condition for its use that there > are > maximally N clients of the data, so that it can foresee N+1 buffer spaces > of the shared data. > Did you then still find problems with the code in cases where this > pre-condition is satisfied? Yes. Among the N clients there can be only one writer. This additional precondition is clear from the implementation and even more clear from the comments at line 119.<http://gitorious.org/orocos-toolchain/rtt/blobs/master/rtt/base/DataObjectLockFree.hpp#line194> Alas, it was not documented. Worst, the doxygen claimed the contrary (see the truth table). > Since that would be a big bug, I guess. > I do not know if having several writers for a non-buffered data port is a common scenario. But it would be a hard to find one certainly, since there is no lock nor warning, only random data corruption. Or are you trying to add more robustness into the implementation in case > the pre-condition is not satisfied? > no, I'm just fixing the doc so that it matches the implementation. Cheers -- Orocos-Dev mailing list [email protected] http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev