Deutsch English Français Italiano |
<mailman.21.1722911646.2890.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail From: Grant Edwards <grant.b.edwards@gmail.com> Newsgroups: comp.lang.python Subject: Re: python C-api and thread Date: Mon, 05 Aug 2024 22:34:05 -0400 (EDT) Lines: 21 Message-ID: <mailman.21.1722911646.2890.python-list@python.org> References: <v8rfki$13c5s$1@dont-email.me> <4WdHSF10ZRznWJR@mail.python.org> X-Trace: news.uni-berlin.de SQa+AZJycnyAJDS7E08g6AI4FjX1a2izE4I7AMKpY4Ww== Cancel-Lock: sha1:111bNG/nggmpKiwI2EKyqkSXFHo= sha256:q0RBidVBOFfdDs1wcd4TtpEPBcuGMCaJp87FIt8ZqYo= Return-Path: <grant.b.edwards@gmail.com> X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org Authentication-Results: mail.python.org; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Status: OK 0.103 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.79; '*S*': 0.00; 'subject:python': 0.06; 'from:addr:grant.b.edwards': 0.16; 'from:name:grant edwards': 0.16; 'independent,': 0.16; 'seen.': 0.16; 'subject:thread': 0.16; 'wrote:': 0.16; 'python': 0.16; 'api': 0.17; 'grant': 0.17; 'to:addr:python-list': 0.20; "i've": 0.22; 'run': 0.23; 'header :User-Agent:1': 0.30; 'python-list': 0.32; 'mean': 0.34; 'trying': 0.35; 'usual': 0.35; 'from:addr:gmail.com': 0.35; 'processes': 0.36; 'using': 0.37; 'two': 0.39; 'shared': 0.39; 'data.': 0.40; 'data,': 0.63; 'ever': 0.63; 'between': 0.63; 'share': 0.63; 'definition': 0.64; 'thus': 0.64; 'independent': 0.65; 'message- id:invalid': 0.68; 'exactly': 0.68; 'process,': 0.75; 'interpreters': 0.84 User-Agent: slrn/1.0.3 (Linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: General discussion list for the Python programming language <python-list.python.org> List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> List-Archive: <https://mail.python.org/pipermail/python-list/> List-Post: <mailto:python-list@python.org> List-Help: <mailto:python-list-request@python.org?subject=help> List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> X-Mailman-Original-Message-ID: <4WdHSF10ZRznWJR@mail.python.org> X-Mailman-Original-References: <v8rfki$13c5s$1@dont-email.me> Bytes: 3042 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