On Thu, 2015-11-05 at 11:11 -0500, Martin Peach wrote:

> 
> In your patch, if you put a [delay] after the bang outlet it will
> start an infinite loop at the delay interval. I'm not sure why the
> delay is necessary though, as [packOSC] should have finished
> processing the previous message by the time the next one arrives, even
> if it's a zero logical time delay.

Attached patch illustrates that you can simply buffer the output of
[packOSC] with [list append]. This fixes the reentrancy problem
_without_ affecting the execution order. A zero logical time delay
breaks the depth-first rule.

Roman

#N canvas 224 44 477 380 10;
#X declare -stdpath osc -stdpath mrpeach;
#X obj 17 180 unpackOSC;
#X msg 17 16 /trigger/osc/message now;
#X msg 44 258 /i/am/reentrant 64;
#X obj 17 202 routeOSC /trigger/osc/message;
#X obj 17 224 t a b;
#X obj 17 290 print SECOND;
#X obj 188 298 print FIRST;
#X obj 208 16 declare -stdpath osc -stdpath mrpeach;
#N canvas 0 44 379 233 packOSC 0;
#X obj 80 114 packOSC;
#X obj 17 79 t b a;
#X obj 17 144 list append;
#X obj 17 30 inlet;
#X obj 17 175 outlet;
#X connect 0 0 2 1;
#X connect 1 0 2 0;
#X connect 1 1 0 0;
#X connect 2 0 4 0;
#X connect 3 0 1 0;
#X restore 17 119 pd packOSC (reentrancy fixed);
#X connect 0 0 3 0;
#X connect 1 0 8 0;
#X connect 2 0 8 0;
#X connect 3 0 4 0;
#X connect 3 1 6 0;
#X connect 4 0 5 0;
#X connect 4 1 2 0;
#X connect 8 0 0 0;

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to