[ntp:hackers] [Gpsd-dev] A lightweight synchronization mechanism for shared memory
f96hajo at chalmers.se
Fri Mar 25 11:08:05 UTC 2011
> Going to at least two buffers gets totally rid of the problem for all
> readers, they can always read a full/valid record.
Not always. As you noted earlier, if the reader involuntarily gets put to
sleep for long enough, then it will (at best) note that (all) entries were
modified meanwhile, i.e. no data that it may have read can be used. And
if it then reattempts then the same thing can happen again. Forever. So
only almost always.
> This is "starkly simple" compared to any setup where all clients have to
> have complicated code to guard against partially updated data.
More information about the hackers