id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6510,boost named_mutex example in documentation is wrong,nitinjavakid@…,Ion Gaztañaga,"I have simplified the example mentioned in http://www.boost.org/doc/libs/1_48_0/doc/html/interprocess/synchronization_mechanisms.html It seems that when we call remove, multiple processes enter the critical section together. I don't know whether its a bug in documentation or a regression on the boost library. This happens when I run 200 instances of the same program. #include #include #include #include #include int main () { using namespace boost::interprocess; try { named_mutex::remove(""fstream_named_mutex""); //Open or create the named mutex named_mutex mutex(open_or_create, ""fstream_named_mutex""); mutex.lock(); std::ofstream file(""file_name""); for(int i = 0; i < 10; ++i){ //Do some operations... //Write to file atomically file << ""Process name, ""; file << ""This is iteration #"" << i; file << std::endl; } mutex.unlock(); named_mutex::remove(""fstream_named_mutex""); } catch(interprocess_exception &ex){ std::cout << ex.what() << std::endl; return 1; } return 0; }",Bugs,closed,To Be Determined,interprocess,Boost 1.46.1,Problem,fixed,,