On 03.12.2024 11:09, Kristian Amlie wrote:
On 02.12.2024 16:00, ichthyo wrote:
With adding that, what guarantees do we have at that point?

- The LV2 standard provides that we can see the Core plugin

- The sync on corePlugin->isReady ensures that we see the changes
   made by the corePlugin *before setting this flag*

Yes, exactly!

But I don't think the second point is necessary, actually. YoshimiLV2PluginUI::init() cannot possibly be called until YoshimiLV2Plugin::instantiate() has returned, due to the first point. At least not based on my understanding of the LV2 spec.

I suppose it is possible that the host has already created the UI thread before calling either method though (the UI thread is likely a single thread used for all of its UI). So it might still be a good idea to force a cache flush. But this only needs to be done once, just before YoshimiLV2Plugin::instantiate() returns.

Which btw, I guess you have already done according to the below paragraph?

So in order to solve the *thread visibiltiy* issue, it is sufficient
to slightly adjust the private methods within InstanceManager so to
ensure that all call paths are protected by the InstanceManager mutex.
I had added this Mutex last summer to protect the setup and tear-down
of Instances, since none of this is performance critical.

Right?

--
Kristian


_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel

Reply via email to