<div dir="ltr">First - I do not want to clutter my code with <i>do_something(); </i>I need this perform this call multiple times at different places.<div>Second -<i> do_something()</i> performs some access control logic, <i>test() </i>is any other function accessing resources. Ideally, developers writing <i>test()</i> functions wouldn't have to worry about access control (this should be hidden).<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 10, 2013 at 3:48 PM, Wes James <span dir="ltr"><<a href="mailto:comptekki@gmail.com" target="_blank">comptekki@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Why are you trying to monitor with B.  Why not just do:<br><br><div>test() -></div><div>    x(),<br></div>
<div>   do_something(),<br></div><div>    y(),</div><div>    z().<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>-wes<br></div>
<br></font></span></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Thu, Oct 10, 2013 at 2:02 AM, Tyron Zerafa <span dir="ltr"><<a href="mailto:tyron.zerafa@gmail.com" target="_blank">tyron.zerafa@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div>  </div><div>    I would like to monitor a process and suspend the execution of certain functions to perform some other computation before. For instance consider a process A which executing the following simple function.</div>


<div><br></div><div>test() -></div><div>    x(),</div><div>    y(),</div><div>    z().</div><div><br></div><div>I would like to initiate a process, B, that monitors the execution of A. </div><div>I want B to:</div><div>


  1) stop A before function y is executed</div><div>  2) execute some logic</div><div>  3) resumes the execution of A (by executing Y and Z)</div><div><br></div><div>So far, I have been following <a href="http://erlang.org/pipermail/erlang-questions/2003-January/006679.html" target="_blank">this post</a> and managed to determine when the y() function call was being done, but cannot suspend its execution. Any ideas how I can achieve this? </div>


<div><br></div><div>Thanks</div><span><font color="#888888"><div>Tyron<br></div></font></span></div>
<br></div></div><div class="im">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></div></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<div>Tyron Zerafa</div>
</div>