<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/14/17 13:11, Robin Gareus wrote:<br>
</div>
<blockquote type="cite"
cite="mid:57813ed3-bd8b-622f-e713-9414294f471d@gareus.org">
<pre wrap="">From <a class="moz-txt-link-freetext" href="http://lv2plug.in/ns/extensions/ui/ui.html" moz-do-not-send="true">http://lv2plug.in/ns/extensions/ui/ui.html</a>
"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.</pre>
</blockquote>
<br>
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.<br>
<br>
<blockquote type="cite"
cite="mid:57813ed3-bd8b-622f-e713-9414294f471d@gareus.org">
<blockquote type="cite" style="color: #000000;">
<pre wrap="">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
lilv_instance_connect_port.
</pre>
</blockquote>
<pre wrap="">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().</pre>
</blockquote>
<p><br>
</p>
<p>This clarifies it, thanks!</p>
<p><br>
</p>
<p>Yuri</p>
<p><br>
</p>
</body>
</html>