Calderon Hector wrote:
1.- I don't see how to lock a file (fstream) for reading/writing. Do I have to use OS functions?
As far as I know there is no "lockable fstream" class in boost. You should be able to implement it yourself using a mutex. In other words, you can use the fstream as a shared resource and lock the mutex before each read and write. You may want to look into the iostreams library and create a thread_safe_iostream.
2.- How do I set a thread to be low priority? Do I have to go to the OS again?
From old postings I remember the objection to this functionality was cross-platform support. There doesn't seem to be a consistent way to set thread priority across all the OSes supported by boost.thread. However this is only my recollection.
-delfin