zeroRains opened a new issue, #42151:
URL: https://github.com/apache/arrow/issues/42151

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   Hi, I want to execute the same function with different python 
sub-interpreter  in different threads. The function codes are like that
   
   ```c++
   void f(const char *tname)
   {
       PyThreadState *_ts = Py_NewInterpreter();
       // sub.swap_to_self();
       std::string code = R"PY(
   import pyarrow
   print("TNAME gan ni niang")
   
   a = 0
   for i in range(100000000):
       a = a+1
       )PY";
   
       code.replace(code.find("TNAME"), 5, tname);
       PyRun_SimpleString(code.c_str());
       Py_EndInterpreter(_ts);
   }
   ```
   But I get a error when I import the pyarraow inthe sub-interpreter
   
   > import pyarrow.lib as _lib
   > ImportError: module pyarrow.lib does not support loading in 
sub-interpreters
   
   Dose I use the pyarrow in a wrong way? Or It dosen't allow use in the 
sub-interpreters?
   
   If the later is, will it support in the future?
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to