P
Philipp Kraus
Hello,
I must read a lot of files like this
std::ifstream l_file;
l_file.open(p_str1.c_str(), std::ifstream::binary);
std::copy( std::istream_iterator<char>(l_file),
std::istream_iterator<char>(),
std:streambuf_iterator<char>(&l_deflate) );
l_file.close();
I deflate the file content with bzip. I would do this in a multithread
content, so my question is, can I do this without any problems during
reading?
In some cases two thread can use the same file (p_str1 is in two
threads equal). Can i read the same file out of two thread or is a
mutex required?
Thanks
Phil
I must read a lot of files like this
std::ifstream l_file;
l_file.open(p_str1.c_str(), std::ifstream::binary);
std::copy( std::istream_iterator<char>(l_file),
std::istream_iterator<char>(),
std:streambuf_iterator<char>(&l_deflate) );
l_file.close();
I deflate the file content with bzip. I would do this in a multithread
content, so my question is, can I do this without any problems during
reading?
In some cases two thread can use the same file (p_str1 is in two
threads equal). Can i read the same file out of two thread or is a
mutex required?
Thanks
Phil