[LV2] worker thread question
d at drobilla.net
Thu Dec 27 13:27:49 PST 2012
On Tue, 2012-12-25 at 07:06 +0100, hermann meyer wrote:
> New to the list, so first hello to all.
> I come here with a question about the worker thread extension, it's:
> How could I ensure that the worker request will also be send from
> internal host UI's ?
> Say, I have a GUI element that send a message to the engine control
> port, to fire up a work sequence, how could I let the host known that
> this special UI controller do that, and that his internal UI must do the
> same to ensure all work like suspected?
> Even, if the URI in use is a self defined one?
I am not quite sure what you are asking here, but perhaps this will
Everything in the UI API has to do with a single thread. The worker
extension is an API for the plugin, it has nothing to do with the UI.
It is best to think of what you need to do from the simple perspective
of the plugin (which talks to the world via ports), or things just get
It sounds like you are talking about sending messages to the plugin from
the UI and you want these messages processed in the worker? To do this
you use ports normally, all ports are processed in the same thread, i.e.
the process thread that calls run().
If you want to perform actions based on a message that are not
real-time, you receive it in the real-time process thread, then send a
request to the worker from run() to process it in the worker callback.
This is the main point of the worker extension.
The eg-sampler example plugin does exactly this. If you want to do
non-real-time things in response to messages from a UI, do what
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: This is a digitally signed message part
More information about the Devel