Sujet : Re: python C-api and thread (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.pythonDate : 06. Aug 2024, 02:32:49
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v8rqvg$16a8l$3@dont-email.me>
References : 1
User-Agent : Pan/0.159 (Vovchansk; )
On Mon, 5 Aug 2024 23:19:14 +0200, aotto1968 wrote:
Is it possible to run two completely independent Python interpreters in
one process, each using a thread?
By independent, I mean that no data is shared between the interpreters
and thus the C API can be used without any other "lock/GIL" etc.
Seems like yes
<
https://docs.python.org/3/c-api/init.html#c.Py_NewInterpreterFromConfig>.