Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-03-04 13:36:56

At 05:50 AM 3/4/2002, Jan Langer wrote:

>... i think
>modifying the same file in parallel with two dir_entries or similar
>things should be prohibited.

You can't, at least in general. Here is a new "reality" I've added to the
design docs:

Directory trees, directories, files, and file attributes are in effect
shared between all threads, processes, and computers which have access to
the file system. That may well include computers on the other side of the
world or in orbit around the world. This implies that file system
operations may fail in unexpected ways. For example:

      assert( exists("foo") == exists("foo") ); // may fail!
      assert( is_directory("foo") == is_directory("foo"); // may fail!

In the first example, the file may have been deleted between calls to
exists(). In the second example, the file may have been deleted and then
replaced by a directory of the same name between the calls to

Unpleasant, isn't it?


Boost list run by bdawes at, gregod at, cpdaniel at, john at