| Deutsch English Français Italiano |
|
<v8seqr$1daq2$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!npeer.as286.net!npeer-ng0.as286.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.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 Date: Tue, 6 Aug 2024 08:11:39 +0200 Organization: A noiseless patient Spider Lines: 26 Message-ID: <v8seqr$1daq2$2@dont-email.me> References: <v8rfki$13c5s$1@dont-email.me> <4WdHSF10ZRznWJR@mail.python.org> <mailman.21.1722911646.2890.python-list@python.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 06 Aug 2024 08:11:40 +0200 (CEST) Injection-Info: dont-email.me; posting-host="025088cc8906f7a327204dc6f63a9fcf"; logging-data="1485634"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WPp64dLtOqcAgphcM7kTFQLMblL8AVBw=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:GrLMOaUMVQ6V8pN/hnjlibFPhP0= In-Reply-To: <mailman.21.1722911646.2890.python-list@python.org> Content-Language: en-US Bytes: 2107 On 06.08.24 04:34, Grant Edwards wrote: > On 2024-08-05, aotto1968 via Python-list <python-list@python.org> 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. > > No, not using any OS I've ever seen. The usual definition of "threads" > is that they share data, and the definition of "processes" is that > processes don't share data. > > How exactly does what you're trying to do differ from runnig two > Python interpreters in two processes? > > -- > Grant > > > I know but I use a thread like a process because the "conversation" between the threads is done by my software. a Thread is usually faster to startup (thread-pool) this mean for high-load this is significant faster even than fork.