On 21/03/2012 7:25 PM, Gaspard Bucher wrote:
Well that's fine so long as you are happy that reads and writes are blocking. Avoiding blocking (i.e. risk of priority inversion) is usually why you would deploy a lock-free fifo queue in the first place. Perhaps writing to a pipe is potentially a blocking operation anyway. If real-time non-blocking is a requirement you should consider using a priority inheritance mutex where available.Following advices in this mail thread (!) and on [1], I decided to use a scoped lock in the Fifo to keep the API simple from a user perspective but ensure that the code is safe.
Ross.