Boost File Locks Do not work as advertised?
I'm following the example at:
http://www.boost.org/doc/libs/1_35_0/doc/html/interprocess/synchronization_m...
for locking and writing to a file, but when a flush is called either
implicitly due to a full buffer, or an explicit flush no data is written and
the fstream bad() call returns true.
If I write a small enough amount of data and don't explicitly flush it works
because I unlock the file then call close (where an implicit flush occurs).
However, if a flush occurs at any time the file lock is locked no data is
written and bad() return true.
[START OF CODE]
#include <fstream>
#include <iostream>
#include
participants (1)
-
Michael Dehmlow