This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Can't create new interpreter in multi thread
Type: behavior Stage: resolved
Components: C API Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, hekun19890913, samuel-thibault
Priority: normal Keywords:

Created on 2021-04-06 12:22 by hekun19890913, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
newinter.tar.xz hekun19890913, 2021-04-06 12:22
Messages (3)
msg390322 - (view) Author: Kun He (hekun19890913) Date: 2021-04-06 12:22
Hello,

I'm working a C extension interface of Python. I want to create a new interpreter by using the function Py_NewInterpreter() in a new thread, which is created by pthread_create (my test files are in attachment), but there are always errors when calling Py_NewInterpreter() such as "failed: object already tracked by the garbage collector". 

I suppose that it may be a bug of Python source code? I would like to ask how to solve the problem and create a new interpreter in multi thread in Python C extension?

Sincerely,
Kun
msg390532 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-04-08 15:17
You might have more luck asking on the capi-sig mailing list: https://mail.python.org/mailman3/lists/capi-sig.python.org/

I'm going to close this, because it looks like a usage question and not a bug. If it turns out to be a bug, please re-open this issue.
msg390641 - (view) Author: Samuel Thibault (samuel-thibault) * Date: 2021-04-09 16:18
I don't see how to reopen this, we'd probably want to mark it as a duplicate of the newly-opened https://bugs.python.org/issue43793 , see 
https://mail.python.org/archives/list/capi-sig@python.org/thread/7FI6V2KFBFZIXC6LZLKHY4Z7TUJ6YWTX/
History
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87913
2021-04-09 16:18:30samuel-thibaultsetmessages: + msg390641
2021-04-08 15:17:46eric.smithsetstatus: open -> closed

nosy: + eric.smith
messages: + msg390532

resolution: not a bug
stage: resolved
2021-04-06 13:00:53samuel-thibaultsetnosy: + samuel-thibault
2021-04-06 12:22:14hekun19890913create