<div dir="ltr"><div>As I see it, the only way that [packOSC] can receive a message before it has completed the previous message is if its own output triggers another message to its input. It may be possible to detect that special case and either let it happen or not, but it's tricky because the buffer for the list is deallocated as soon as the list is output, and the new message arrives while that is taking place. Possibly using a fixed buffer would work better, and also speed up the code. The function then might just exit before it is called again, avoiding the error.<br><br></div>Martin<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 5, 2015 at 1:21 PM, Roman Haefeli <span dir="ltr"><<a href="mailto:reduzent@gmail.com" target="_blank">reduzent@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, 2015-11-05 at 11:11 -0500, Martin Peach wrote:<br>
<br>
><br>
</span><span class="">> In your patch, if you put a [delay] after the bang outlet it will<br>
> start an infinite loop at the delay interval. I'm not sure why the<br>
> delay is necessary though, as [packOSC] should have finished<br>
> processing the previous message by the time the next one arrives, even<br>
> if it's a zero logical time delay.<br>
<br>
</span>Attached patch illustrates that you can simply buffer the output of<br>
[packOSC] with [list append]. This fixes the reentrancy problem<br>
_without_ affecting the execution order. A zero logical time delay<br>
breaks the depth-first rule.<br>
<span class="HOEnZb"><font color="#888888"><br>
Roman<br>
<br>
</font></span><br>_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>