<div dir="ltr">FYI: I reported the 1st issue on GitHub (<a href="https://github.com/pure-data/pure-data/issues/129">https://github.com/pure-data/pure-data/issues/129</a>) and I create a PR that solves the 2nd on libpd (<a href="https://github.com/libpd/libpd/pull/178">https://github.com/libpd/libpd/pull/178</a>)</div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-21 9:53 GMT+02:00 Pierre Guillot <span dir="ltr"><<a href="mailto:guillotpierre6@gmail.com" target="_blank">guillotpierre6@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Now, I try to use it in a multi-threads context with libpd. The idea is to detach a new thread each time I want to perform an action on an instance (I could have use one thread per instance and signals but it is simpler for a 1st approach). I encountered 2 issues:<br></div><div><div>- pdinstance_free crashes (I'll investigate the problem)</div><div>- libpd_openfile crashes. It seems that sys_lock() does not really lock and the other instances can pass it before the 1st one has called sys_unlock().</div></div><div>My libpd tests are in the folder samples/c/pdtest_thread in my libpd fork <a href="https://github.com/pierreguillot/libpd/tree/dev/threadable" target="_blank">https://github.com/<wbr>pierreguillot/libpd/tree/dev/<wbr>threadable</a></div><div><br></div><div>Cheers,</div><div><br></div><div>Pierre</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-07-18 21:28 GMT+02:00 Pierre Guillot <span dir="ltr"><<a href="mailto:guillotpierre6@gmail.com" target="_blank">guillotpierre6@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>I tried today the new multi-threads and multi-instances support in my own PD wrapper and (after a small headache I admit) all my unit-tests passed so I guess it's very promising. Next step is to use it with libpd, I'll keep you informed of my tests.</div><div>Thanks a lot for all the work!</div><div><br></div><div>Cheers,</div><div>Pierre </div><div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>