[PD-dev] Thread concurrency question

Pierre Guillot guillotpierre6 at gmail.com
Sat Jan 13 12:07:54 CET 2018


Another problem with the thread but I think I did something wrong. In my
plugin, I have one thread that send messages to Pd and processes the DSP
chain. I have another thread that manages the GUI. From this thread, I also
send messages to Pd but to avoid thread concurrency issues I use "sys_lock"
and "sys_unlock". But this seems to produce artifacts (small cracks). When
I remove the GUI, there is no more artifacts. And previously when I used a
timer (attached to a  specific thread) for each GUI object there were a lot
of artifacts. So I think the thread context and the artifacts are linked
but I can't figure out the real problem. My ideas are a bit going in circle
for now so do you think there would be something that I forgot or something
goes beyond my knowledge? Should I try to synchronize all the messages on
the "main" DSP thread?

Cheers,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180113/2d5be8f7/attachment.html>


More information about the Pd-dev mailing list