Re: DataObjectLockFree: fix facts in doxygen

Peter Soetens <[email protected]>
Newsgroups gmane.science.robotics.orocos.devel
Message-ID <CAMYDobXYdR+0nJvaVcy_-JTxCrjrAXngny+GZTWhSvKwo3g3UQ@mail.gmail.com>
On Tue, Dec 11, 2012 at 3:06 PM, Sébastien Barthélémy
<[email protected]> wrote:
> Hello,
>
> if I got it right, DataObjectLockFree advertises more than it actually does.
> See attached patch.

Hmm. Thanks for fixing, the code diverged a lot from the docs. What
remains undocumented is the importance of max_threads. We should
document this variable instead of :

+     *
+     * The internal buffer can get full if too many concurrent reads are
+     * taking to long. In such a case, the write occurs anyway and late
+     * readers can get corrupted values.

Which should imo read:

+     *
+     * The internal buffer will get full if more concurrent threads
than max_threads
+     * are accessing this object. In such a case, the read occurs
anyway and late
+     * readers can get corrupted values.

And then also fixup the documentation of the constructor. So for
clarity, this is a single-write 'max_threads-1' readers
implementation, and it can't detect itself if the user violates this.

I suppose you were you bitten by these false promises ?

Peter
-- 
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.