<div>Hi,</div> <div>I am a little confused about how to make 'interprocess_mutex' part of the 'managed_shared_memory' object which actually represents the shared_memory? Is there a base class or something that can take the mutex? </div> <div> </div> <div>I placed an '<strong>interprocess_mutex</strong>' as a member variable <strong>in the class that contains my 'managed_shared_memory'</strong> object as a member variable and was locking it in the methods that accessed the shared memory. I guess this did not work out as I believe what I did effectively locked the object of my class that was holding the embers. And since this is not actually the shaed resource between the processes it didn't work out.. </div> <div> </div> <div>I'd really appreciate if you could provide an example of just show me bbased on my initial code.. how the 'managed_shared_memory' can be locked using the mutex.</div> <div> </div> <div>Sreenu<br><br> </div> <div><span class="gmail_quote">On 1/9/08, <b class="gmail_sendername">Srinivas Gardas</b> <<a href="mailto:gardas@gmail.com">gardas@gmail.com</a>> wrote:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <div>Hi Ion,</div> <div>Probably that's the reason.. I haven't used any mutexes thought it's all implemented in the 'interprocess'. I am kind of new to this stuff.. Could please give me a code example where 'interprocess_mutex' is used by a 'Server' and 'Client' to lock the managed_shared_memory ? </div> <div> </div> <div>I really appreciate your help.</div> <div> </div> <div>Thanks & Regards</div> <div>Sreenu</div> <div><span class="e" id="q_1175f62c64eebca3_1"> <div><br><br> </div> <div><span class="gmail_quote">On 1/8/08, <b class="gmail_sendername">Ion Gazta�aga</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:igaztanaga@gmail.com" target="_blank">igaztanaga@gmail.com </a>> wrote:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Srinivas Gardas escribi�:<br>> Hi,<br>> I am facing an issue with the 'Shared Memory File'.. Sometimes I get the <br>> 'SharedMemory File Name' as the first element of the structure that I used,<br>> to create a 'interprocess::list' and when this happens, it means that the<br>> SharedMemory got corrupted and my program crashes. Has anyone faced this <br>> issue, or does anyone know what might be wrong?<br><br>I don't see any problem with your approach, can you give me more<br>information? Also, take in care that you need to use mutexes to protect<br>concurrent accesses to the list (an interprocess_mutex constructed in <br>the segment should work).<br><br>Regards,<br><br>Ion<br>_______________________________________________<br>Boost-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Boost-users@lists.boost.org" target="_blank"> Boost-users@lists.boost.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users </a><br></blockquote></div><br></span></div></blockquote></div><br>