summaryrefslogtreecommitdiffstats
path: root/slv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-11-09 20:38:26 +0000
committerDavid Robillard <d@drobilla.net>2006-11-09 20:38:26 +0000
commita77b95f6c6d61751ff6fc2eb5ba603669167a0f9 (patch)
treea6450afd02d0560fa593e7488ba160da2c1ee72d /slv2
parent3564a10fec009e2a3b5d6e9c0e2794e45d64de65 (diff)
downloadlilv-a77b95f6c6d61751ff6fc2eb5ba603669167a0f9.tar.gz
lilv-a77b95f6c6d61751ff6fc2eb5ba603669167a0f9.tar.bz2
lilv-a77b95f6c6d61751ff6fc2eb5ba603669167a0f9.zip
Updated lv2.h with threading rules (comment only).
git-svn-id: http://svn.drobilla.net/lad/slv2@198 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'slv2')
-rw-r--r--slv2/lv2.h28
1 files changed, 28 insertions, 0 deletions
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.
*/