# HG changeset patch # User Sebastien Jodogne # Date 1610006614 -3600 # Node ID 404aca6160f0e041fa330c74b53a97a61b33a672 # Parent 759621392384355789ec3de40cbcc24a626e0b33 warning about deadlock in python diff -r 759621392384 -r 404aca6160f0 Sphinx/source/plugins/python.rst --- a/Sphinx/source/plugins/python.rst Wed Jan 06 18:29:43 2021 +0100 +++ b/Sphinx/source/plugins/python.rst Thu Jan 07 09:03:34 2021 +0100 @@ -277,6 +277,19 @@ orthanc.RegisterOnChangeCallback(OnChange) + +.. warning:: + Your callback function will be called synchronously with + the core of Orthanc. This implies that deadlocks might emerge if + you call other core primitives of Orthanc in your callback (such + deadlocks are particular visible in the presence of other plugins + or Lua scripts). It is thus strongly advised to avoid any call to + the REST API of Orthanc in the callback. If you have to call other + primitives of Orthanc, you should make these calls in a separate + thread, passing the pending events to be processed through a + message queue. + + Accessing the content of a new instance ....................................... @@ -306,6 +319,18 @@ orthanc.RegisterOnStoredInstanceCallback(OnStoredInstance) +.. warning:: + Your callback function will be called synchronously with + the core of Orthanc. This implies that deadlocks might emerge if + you call other core primitives of Orthanc in your callback (such + deadlocks are particular visible in the presence of other plugins + or Lua scripts). It is thus strongly advised to avoid any call to + the REST API of Orthanc in the callback. If you have to call other + primitives of Orthanc, you should make these calls in a separate + thread, passing the pending events to be processed through a + message queue. + + Calling pydicom ...............