[LV2] Is suil_instance_port_event thread-safe? Is lilv atomic-safe when handling changing control port values?
yuri at rawbw.com
Thu Sep 14 13:33:12 PDT 2017
On 09/14/17 13:11, Robin Gareus wrote:
> "UIs written to this specification do not need to be thread-safe. All
> functions may only be called in the "UI thread". There is only one UI
> thread (for toolkits, the one the UI main loop runs in)."
> ergo: The host must call all UI functions in a single thread.
IMO, it's worth mentioning in its man page that suil_instance_port_event
isn't thread-safe, because it is very easy to call it from other threads.
>> Another, related issue is between plugin, running in a separate thread,
>> and control values changed by the app. Control values are floating point
>> numbers, shared between the app and a plugin using
> A plugin cannot modify its own inputs, so atomicity is not needed. It's
> always the host that writes values and the values must not change while
> a plugin's run() is called.
> A common implementation technique is for the host to double-buffer the
> control-parameters and set them before calling lilv_instance_run().
This clarifies it, thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel