<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>I see the next important step as making the general cases easier to handle.  A per-thread context such as IOhannes and Peter describe above seems like the best approach to allowing a program to run multiple instances of pd in a much more predictable manner, while it still allows for backwards compatibility (via a default &#39;legacy&#39; context).  I see parallel processing as a different topic, although it will be easier to implement once the static variables are taken care of.</div>

</div>
</blockquote></div><br>Actually, I would sum up the thread slightly differently.  We&#39;ve touched three different topics: support for multiple instances of Pd, a potential refactoring of Pd on top of a library like libpd, and support for concurrency.   As I see it, those three issues are largely orthogonal to one another.  In particular, I&#39;d rather not entangle multiple instances with multiple threads.<br>
<br>As far as libpd is concerned, the most important part is to achieve support for multiple instances.  Tying instances to threads wouldn&#39;t be too helpful because there are lots of legitimate use cases where one thread needs multiple instances, as well as use cases where one instance is shared between threads.<br>
<br>The next step would be a refactoring of Pd, towards a more portable user interface.  There&#39;s been an ongoing thread at Pd Everywhere on porting the UI to mobile devices (<a href="http://noisepages.com/groups/pd-everywhere/forum/topic/cross-platform-mobile-ui-for-libpd/?topic_page=3&amp;num=15">http://noisepages.com/groups/pd-everywhere/forum/topic/cross-platform-mobile-ui-for-libpd/?topic_page=3&amp;num=15</a>), and  I wrote up a few thoughts on my blog (<a href="http://nettoyeur.noisepages.com/2012/01/refactoring-pure-data/">http://nettoyeur.noisepages.com/2012/01/refactoring-pure-data/</a>).<br>
<br>Support for concurrency comes in third on my list.  I already outlined most of my concerns in previous messages, and I also figure that this should be tabled until the other two problems have been solved.<br>Cheers,<br>
     Peter<br><br>