changeset 4180:ee9b2e2c7e19

merge
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 08 Sep 2020 07:43:07 +0200
parents 3576616904d3 (current diff) 669f588a14b3 (diff)
children b416b6bf129b
files
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h	Mon Sep 07 15:08:52 2020 +0200
+++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h	Tue Sep 08 07:43:07 2020 +0200
@@ -1996,6 +1996,11 @@
    *
    * This function registers a callback function that is called
    * whenever a new DICOM instance is stored into the Orthanc core.
+   *
+   * @warning If your 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 scripts.
    * 
    * @param context The Orthanc plugin context, as received by OrthancPluginInitialize().
    * @param callback The callback function.
@@ -7597,12 +7602,18 @@
   } _OrthancPluginIncomingDicomInstanceFilter;
 
   /**
-   * @brief Register a callback to filter incoming DICOM instance.
+   * @brief Register a callback to filter incoming DICOM instances.
    *
    * This function registers a custom callback to filter incoming
    * DICOM instances received by Orthanc (either through the REST API
    * or through the DICOM protocol).
    *
+   * @warning If your filter 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
+   * scripts.
+   *
    * @param context The Orthanc plugin context, as received by OrthancPluginInitialize().
    * @param callback The callback.
    * @return 0 if success, other value if error.