docs/bindings.rst: minor update to description of environmental variable MUPDF_mt_ctx.
authorJulian Smith <[email protected]>
Thu, 17 Nov 2022 19:26:07 +0000 (19:26 +0000)
committerJulian Smith <[email protected]>
Mon, 12 Dec 2022 11:40:52 +0000 (11:40 +0000)
Also mention mupdf::reinit_singlethreaded().

docs/bindings.rst

index ada6eef642825f4915d1cc134e51034c8e0a3f4d..19dacb8c05ef023c7d010a322aea0ecd6464a3b7 100644 (file)
@@ -177,15 +177,16 @@ Environmental variables
 
 * **MUPDF_mt_ctx**
 
-  Controls auto-generated internal `fz_context*`.
+  Controls support for multithreading on startup.
 
-  * Unset or "1": each thread has its own `fz_context*`.
+  * If set with value "0", a single `fz_context*` is used for all threads; this
+    might give a small performance increase in single-threaded programmes, but
+    will be unsafe in multi-threaded programmes.
 
-  * "0": a single `fz_context*` is used for all threads; this might give
-    a small performance increase in single-threaded programmes, but will be
-    unsafe in multi-threaded programmes.
+  * Otherwise each thread has its own `fz_context*`.
 
-  * Other values are unrecognised and will stop execution.
+  One can instead call ``mupdf::reinit_singlethreaded()`` on startup to force
+  single-threaded mode. This should be done before any other use of MuPDF.
 
 Debug builds only
 ^^^^^^^^^^^^^^^^^