[Boost-bugs] [Boost C++ Libraries] #8470: managed_mapped_file goes to loop

Subject: [Boost-bugs] [Boost C++ Libraries] #8470: managed_mapped_file goes to loop
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-22 09:10:58


#8470: managed_mapped_file goes to loop
------------------------------------+---------------------------------------
 Reporter: mikhail.smal@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: mapped file loop |
------------------------------------+---------------------------------------
 I run this:

 {{{
 managed_mapped_file myMem( open_only, "mfile.bin" );

 void* ptr = myMem.get_address();
 std::size_t size = myMem.get_size(); // ==1024*1024

 int* pInt = (int*)ptr;
 *pInt = 1;

 myMem.flush();
 }}}

 and after that I run it again, but it doesn't work because of


 {{{
 while(value == InitializingSegment || value == UninitializedSegment){
             thread_yield();
             value = atomic_read32(patomic_word);
          }

 }}}
 InitializingSegment is always 1
 It seems that I can't write 1 and it seems to be wrong.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8470>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC