diff Plugins/Include/orthanc/OrthancCPlugin.h @ 1642:0669d05b6de1

warning about OrthancPluginRegisterOnChangeCallback
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Sep 2015 13:39:00 +0200
parents ffd23c0104af
children 87c77b9b3679
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.