[gmpi] Re: multithreading host interface

  • From: Mike Berry <mberry@xxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Thu, 10 Apr 2003 11:24:10 -0600



Vincent Burel wrote:

----- Original Message -----
From: "Mike Berry" <mberry@xxxxxxxxx>
To: <gmpi@xxxxxxxxxxxxx>
Sent: Thursday, April 10, 2003 6:23 PM
Subject: [gmpi] Re: multithreading host interface



I am in agreement here. I think that the documentation for every
function should list the following:

1.) Can the function be simultaneously called by multiple threads?


i don't think it's necessary.
the SET/GET_datas function can be called by one thread only (the GUI one)
while the ProcessFonction is called in CriticalTime Thread.

Im not sure I agree here. I could definitely see the Set/Get paramter functions being called on multiple threads: Primary UI, Serial thread for MIDI/controller data, audio process thread(s) for automation, etc....



2.) Can the function ever be serially called by more than one thread?


i don't think it's necessary.
if an other Thread (than the GUI) wants to get or set data , we might
provide another SET/GETfunctions. it's easier to go in this way than to
design something where 5 threads can Get or Set context of the effect in the
same time.

for example
Get/Set for GUI port
Get/Set for meter display port
Get/Set for MIDI port
Get/Set for ETHERNET port
etc...

I think it is a very bad idea to try to predict all of the threads that a host may have and provide separate calls for each. What happens then when the host needs one that we forgot? Particularly with parameter calls which are not too difficult for the plugin to synchronize.


Remember too that these rules will be defined for callbacks to the host, so we need to define the threading rules for callbacks too.


3.) Is the function time-critical? I.e., is it usually going to be
called by a very high priority thread.


only the processing function i think.


Certainly the processing function(s). But what about, for instance, time functions, where the host pushes the current time to the plugin? And what callbacks does the host guarantee to be time-critical, and therefore safe for the plugin to call from a time-critical function?


Anyway, I wasn't suggesting that we try to define the thread requirements for all functions now. Simply that we agree on a list of threading/rt rules that are enumerated for all functiosn and callbacks in the SDK.


-- Mike Berry Adobe Systems


---------------------------------------------------------------------- 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: