Skip to content

Commit 09c454d

Browse files
committed
Make it clear that multi context works not only in jvm mode
1 parent a23366e commit 09c454d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/user/Native-Extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ You can also manually trigger the detector with the Python `gc.collect()` call.
4949

5050
### Multi-Context and Native Libraries
5151

52-
To support creating multiple GraalPy contexts that access native modules within the same JVM, we need to isolate them from each other.
52+
To support creating multiple GraalPy contexts that access native modules within the same JVM or Native Image, we need to isolate them from each other.
5353
The current strategy for this is to copy the libraries and modify them such that the dynamic library loader of the operating system will isolate them for us.
54-
To do this, all GraalPy contexts in the same JVM (not just those in the same engine!) must set the `python.IsolateNativeModules` option to `true`.
54+
To do this, all GraalPy contexts in the same process (not just those in the same engine!) must set the `python.IsolateNativeModules` option to `true`.
5555

5656
On Linux, Python native extensions expect to lookup Python C API functions in the global namespace and specify no explicit dependency on any libpython.
5757
To isolate them, we copy them with a new name, change their `SONAME`, add a `DT_NEEDED` dependency on a copy of our libpython shared object, and finally load them with `RTLD_LOCAL`.

0 commit comments

Comments
 (0)