<div>Hi,</div>
<div>I am a little confused about how to make &#39;interprocess_mutex&#39; part of the &#39;managed_shared_memory&#39; object which actually represents the shared_memory? Is there a base class or something that can take the mutex?
</div>
<div>&nbsp;</div>
<div>I placed an &#39;<strong>interprocess_mutex</strong>&#39; as a member variable <strong>in the class that contains my &#39;managed_shared_memory&#39;</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&#39;t work out..
</div>
<div>&nbsp;</div>
<div>I&#39;d really appreciate if you could provide an example of just show me bbased on my initial code.. how the &#39;managed_shared_memory&#39; can be locked using the mutex.</div>
<div>&nbsp;</div>
<div>Sreenu<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 1/9/08, <b class="gmail_sendername">Srinivas Gardas</b> &lt;<a href="mailto:gardas@gmail.com">gardas@gmail.com</a>&gt; 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&#39;s the reason.. I haven&#39;t used any mutexes thought it&#39;s all implemented in the &#39;interprocess&#39;. I am kind of new to this stuff.. Could please give me a code example where &#39;interprocess_mutex&#39; is used by a &#39;Server&#39; and &#39;Client&#39; to lock the managed_shared_memory ? 
</div>
<div>&nbsp;</div>
<div>I really appreciate your help.</div>
<div>&nbsp;</div>
<div>Thanks &amp; Regards</div>
<div>Sreenu</div>
<div><span class="e" id="q_1175f62c64eebca3_1">
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 1/8/08, <b class="gmail_sendername">Ion Gazta�aga</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:igaztanaga@gmail.com" target="_blank">igaztanaga@gmail.com
</a>&gt; 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>&gt; Hi,<br>&gt; I am facing an issue with the &#39;Shared Memory File&#39;.. Sometimes I get the 
<br>&gt; &#39;SharedMemory File Name&#39; as the first element of the structure that I used,<br>&gt; to create a &#39;interprocess::list&#39; and when this happens, it means that the<br>&gt; SharedMemory got corrupted and my program crashes. Has anyone faced this 
<br>&gt; issue, or does anyone know what might be wrong?<br><br>I don&#39;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>