Mercurial > hg > orthanc-book
changeset 590:404aca6160f0
warning about deadlock in python
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 07 Jan 2021 09:03:34 +0100 |
parents | 759621392384 |
children | 2397b0e12bc8 |
files | Sphinx/source/plugins/python.rst |
diffstat | 1 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 ...............