changeset 1642:0669d05b6de1

warning about OrthancPluginRegisterOnChangeCallback
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Sep 2015 13:39:00 +0200
parents 4e56b5a206b7
children 87c77b9b3679
files Plugins/Include/orthanc/OrthancCPlugin.h
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Include/orthanc/OrthancCPlugin.h	Wed Sep 23 12:43:05 2015 +0200
+++ b/Plugins/Include/orthanc/OrthancCPlugin.h	Wed Sep 23 13:39:00 2015 +0200
@@ -2167,6 +2167,12 @@
    *
    * This function registers a callback function that is called
    * whenever a change happens to some DICOM resource.
+   *
+   * @warning If your change callback has to call the REST API of
+   * Orthanc, you should make these calls in a separate thread (with
+   * the events passing through a message queue). Otherwise, this
+   * could result in deadlocks in the presence of other plugins or Lua
+   * script.
    * 
    * @param context The Orthanc plugin context, as received by OrthancPluginInitialize().
    * @param callback The callback function.