$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Merrill Cornish (merrill.cornish_at_[hidden])
Date: 2006-03-01 14:56:25
Hector,
>>> how to lock a file (fstream) for reading/writing
Are you trying to lock the _file_ on disk for all applications running on the system? Or, are you trying to lock a stream opened to that file for different threads in your application?
In the first case, you need to use an OS-level lock, not Boost. In the second case, use a mutex as someone else suggested.
Merrill