[LV2] worker thread question

hermann meyer brummer- at web.de
Tue Dec 25 21:51:07 PST 2012

Am 26.12.2012 00:53, schrieb Robin Gareus:
> On 12/25/2012 07:06 AM, hermann meyer wrote:
>> Hi
>> 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?
Hi robin

Thanks for your response
> I don't think you can.  The plugin itself needs to check in run() if a
> worker is needed and schedule a worker thread if so.
Sure, I can do that, but that mean that some of the work which could 
properly done in none rt-thread needs to be moved to the rt-thread 
(check state). I'm not as happy to do that.

> I am not aware of a mechanism to specify custom available URI messages
> to be used in generic UIs.
That wouldn't be a problem, there could be used a int or what ever to 
indicate a special work to be done.

> Can you make the decision if to launch a worker dependent on some
> internal state rather than a message?
> The message from your custom UI should just modify the internal state,
> as would interaction with the generic host-UI. ->  both will eventually
> trigger the worker.
Well, that is what I have suspected, as I said, I'm not really happy 
about that, I guess that if I have a lot states to check, I need to set 
up my own worker thread to be able to keep the rt-thread as light as 
possible and gives the host the chance to create a working internal UI.

> ciao,
> robin


More information about the Devel mailing list