<div class="gmail_quote">On Thu, Jun 2, 2011 at 9:17 PM, Ronald Frazier <span dir="ltr">&lt;<a href="mailto:ron@ronfrazier.net">ron@ronfrazier.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Mon, May 30, 2011 at 8:22 PM, Michael T. Dean<br>
&lt;<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>&gt; wrote:<br>
&gt;&gt;&gt; I would like to lock the box during the channel<br>
&gt;&gt;&gt; change script it unlock it once the recording has finished.<br>
<br>
&gt;&gt; Use the System Events subsystem to trigger the calls on recording<br>
&gt;&gt; start/end.<br>
<br>
One potential issue I can think of is a race condition when there are<br>
2 recordings back to back. Is there any guarantee of ordering of these<br>
myth events? Will the finished-recording event be triggered and<br>
allowed to complete before the next recording starts and the<br>
start-recording event is triggered? If not, then you can end up with<br>
the situation where myth calls the channel change script before the<br>
unlock script has completed, and thus the channel never changes. You<br>
can work around this by making sure you unlock before changing a<br>
channel, but then if they complete out of order, the channel change<br>
script could unlock, change channel, and relock, and then the<br>
finished-recording script unlocks it again a second later.<br>
<font color="#888888"><br></font></blockquote><div>Given that they are trying to control an external box, surely there will never be two recordings programmed at the same time (assuming that the box can only output one channel at a time). </div>
</div>