[gmpi] Re: Topic 5: Threading

  • From: "Angus F. Hewlett" <amulet@xxxxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Thu, 10 Apr 2003 15:17:30 -0400 (EDT)

On Thu, 10 Apr 2003, Mike Berry wrote:

>       I can definitely see calling to ask a plugin for its parameter value on
> multiple threads. I may not even be running the process thread, but want
> to get/set parameters or programs on the plugin.

Yes, but if the process thread is not running, there is no other thread
accessing the plug-in, so you're safe to make those calls.

>       I am also definitely not going to create/destroy plugin objects on the
> high priority process thread. This would even be illegal on some platforms.
>       I think is is very unreasonable to require that all plugin calls are on
> one and only one thread. This would make the plugins difficult to
> impossible to host in many sitautions.

OK, perhaps I didn't explain my suggestion so well... hows about, while
the process thread is active, no other thread may call in to the plug, OR,
the host must synchronize things such that the plug is not called from two
threads at once.

So, let me pose the question a different way:-
besides GUI and "long operations" (loading data from disk..), is there any
reason why more than one thread needs to call in to the plug at any one time?

One possibility strikes me.. that of converting internal parameter values
to human readable text.. this kind of operation might take a while, but I
don't know which cost is worse:- the plugins having to implement locks
every which way, or there being now and again some transcendental math
calls in the realtime thread when the host needs to update human-readable
parameter values on its display.

Regards,
        Angus.


----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: