<div dir="ltr">Dear all,<div><br></div><div>I'm developing an external that has two threads, one audio thread and one worker thread. The audio thread contains all usual stuff; while the worker thread computes calculations (I need knn searches and so on for my resynthesis) and put them in a data structure. At the end of calculations, the worker thread atomically CAS the data structure.</div><div>Actually, I'm using a [readsf~]-like mechanics with pthread signal to communicate between threads.</div><div><br></div><div>I would like to remove lock and use a lock free system. I don't know if it feasible. Moreover I don't know if it has some sense, because Pd locks a mutex in scheduler and I don't know if a lock free implementation could be a right solution.</div><div><br></div><div>In the case it could be a solution, I will start with a SPSC circular queue and I will use atomic CAS to swap the data structure.</div><div><br></div><div>Best regards,</div><div><br></div><div>Marco</div></div>