From 4a99ba3484537a36350984cab0f80c11526242da Mon Sep 17 00:00:00 2001 From: Mark Stephenson Date: Tue, 4 Apr 2023 15:02:46 -0600 Subject: [PATCH 1/2] Note multiprocessing start method compatibility --- docs/source/limitations.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/source/limitations.rst b/docs/source/limitations.rst index 2856d273..f9182a76 100644 --- a/docs/source/limitations.rst +++ b/docs/source/limitations.rst @@ -67,6 +67,20 @@ run: ...: a Out[3]: array([1., 1., 1., 2., 2., 2., 3., 3., 4., 4.]) +While not supported or guaranteed to be stable, PyJulia tends to work +with the multiprocessing library if the correct `start method +`_ +is selected: *fork* (default on Unix) segfaults with with `unknown +function` errors, while *spawn* (default on Windows and MacOS) generally, +but not always, runs without memory allocation issues. To select *spawn*, +include the line + +.. code:: python + + multiprocessing.set_start_method('spawn') + +once in your code prior to using the multiprocessing library. + PyJulia does not release GIL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From af85977d36fce51b2b15c46df4ae1838e4370583 Mon Sep 17 00:00:00 2001 From: Mark Stephenson Date: Wed, 5 Apr 2023 14:48:13 -0600 Subject: [PATCH 2/2] Update docs/source/limitations.rst Co-authored-by: Mark Kittisopikul --- docs/source/limitations.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/limitations.rst b/docs/source/limitations.rst index f9182a76..522201e7 100644 --- a/docs/source/limitations.rst +++ b/docs/source/limitations.rst @@ -67,6 +67,9 @@ run: ...: a Out[3]: array([1., 1., 1., 2., 2., 2., 3., 3., 4., 4.]) +Multiprocessing +~~~~~~~~~~~~~~~ + While not supported or guaranteed to be stable, PyJulia tends to work with the multiprocessing library if the correct `start method `_