From a77b95f6c6d61751ff6fc2eb5ba603669167a0f9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 9 Nov 2006 20:38:26 +0000 Subject: Updated lv2.h with threading rules (comment only). git-svn-id: http://svn.drobilla.net/lad/slv2@198 a436a847-0d15-0410-975c-d299462d15a1 --- slv2/lv2.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'slv2/lv2.h') diff --git a/slv2/lv2.h b/slv2/lv2.h index 7e3b14e..53ab768 100644 --- a/slv2/lv2.h +++ b/slv2/lv2.h @@ -69,6 +69,34 @@ extern "C" { * as 'plugin instances') that can be connected together to perform tasks. * * This API contains very limited error-handling. + * + * Threading rules: + * + * Certain hosts may need to call the functions provided by a plugin from + * multiple threads. For this to be safe, the plugin must be written so that + * those functions can be executed simultaneously without problems. + * To facilitate this, the functions provided by a plugin are divided into + * classes: + * + * Audio class: run(), connect_port() + * Instantiation class: instantiate(), cleanup(), + * activate(), deactivate() + * + * Extensions to this specification which add new functions MUST declare in + * which of these classes the functions belong, or define new classes for them. + * The rules that hosts must follow are these: + * + * - When a function from the Instantiation class is running for a plugin + * instance, no other functions for that instance may run. + * - When a function is running for a plugin instance, no other + * function in the same class may run for that instance. + * + * Any simultaneous calls that are not explicitly forbidden by these rules + * are allowed. For example, a host may call run() for two different plugin + * instances simultaneously. + * + * The extension_data() function and the lv2_descriptor() function are never + * associated with any plugin instances and may be called at any time. */ -- cgit v1.2.1