Documentation: Adds note in Multi-threading section.
authorJamie Lemon <[email protected]>
Thu, 6 Mar 2025 12:42:59 +0000 (12:42 +0000)
committerSebastian Rasmussen <[email protected]>
Fri, 7 Mar 2025 13:50:08 +0000 (14:50 +0100)
docs/src/using-mupdf.rst

index 3d8f2a20d8ee16cf8394166bf2bac6479782d605..6f141da83c3020e236f1a36e7a07047039dff9fb 100644 (file)
@@ -210,6 +210,10 @@ The following simple rules should be followed to ensure that multi-threaded oper
 
    We strongly recommend that `fz_new_context` is called just once, and `fz_clone_context` is called to generate new contexts from that. This will automatically ensure that the same locking mechanism is used in all :title:`MuPDF` instances. For now, we do support multiple completely independent contexts being created using repeated calls to `fz_new_context`, but these MUST share the same `fz_locks_context` (or at least depend upon the same underlying locks). The facility to create different independent contexts may be removed in future.
 
+.. important::
+
+   Most of the :doc:`language-bindings` handle context creation/destruction/cloning, and provide locks for you (i.e. `1`, `4`, `5` above are handled for you). The restrictions on simultaneous use of documents and devices (`2` and `3` above) still apply.
+
 **So, how does a multi-threaded example differ from a non-multithreaded one?**
 
 Firstly, when we create the first context, we call `fz_new_context` as before, but the second argument should be a pointer to a set of locking functions.