Skip to content

Commit 60c6656

Browse files
authored
Explicitly describe about multi-threading
We do not want to support multi-threading in PyCall.
1 parent 1f9e8f0 commit 60c6656

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ pycall.rb supports Ruby version 2.4 or higher.
2121

2222
pycall.rb supports Python version 3.7 or higher.
2323

24+
## PyCall does not support multi-threaded use officially
25+
26+
CPython's C-API has GIL acquiring/releasing functions such as `PyGILState_Ensure` and `PyGILState_Release`. Programmers can call CPython's C-APIs from outside of Python threads if they manage GIL's state by these functions. However, we do not want to officially support the multi-threaded use of PyCall because creating the feature enabling stable multi-threaded use in any situation is too difficult. We want to avoid incurring the costs to support such use cases.
27+
2428
## Note for pyenv users
2529

2630
pycall.rb requires Python's shared library (e.g. `libpython3.7m.so`).

0 commit comments

Comments
 (0)