Deutsch English Français Italiano |
<v8se85$1daq2$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: aotto1968 <aotto1968@t-online.de> Newsgroups: comp.lang.python Subject: Re: python C-api and thread (Posting On Python-List Prohibited) Date: Tue, 6 Aug 2024 08:01:41 +0200 Organization: A noiseless patient Spider Lines: 13 Message-ID: <v8se85$1daq2$1@dont-email.me> References: <v8rfki$13c5s$1@dont-email.me> <v8rqvg$16a8l$3@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 06 Aug 2024 08:01:42 +0200 (CEST) Injection-Info: dont-email.me; posting-host="025088cc8906f7a327204dc6f63a9fcf"; logging-data="1485634"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Y+/Ijc1fJCzA66z9t2C4yEJ8q+c4H8RY=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:AiF3gHdHFN/8zCFHPPUYtmyetII= In-Reply-To: <v8rqvg$16a8l$3@dont-email.me> Content-Language: en-US On 06.08.24 02:32, Lawrence D'Oliveiro wrote: > 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>. → I think that could be a solution.