Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61113

Re: Embedding multiple interpreters

References <52A137B3.7010408@entropicsoftware.com> <52A15DA5.3040705@gmail.com>
Date 2013-12-06 16:21 +1100
Subject Re: Embedding multiple interpreters
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3623.1386307293.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Dec 6, 2013 at 4:16 PM, Michael Torrie <torriem@gmail.com> wrote:
> On 12/05/2013 07:34 PM, Garthy wrote:
>> - My fallback if I can't do this is to implement each instance in a
>> dedicated *process* rather than per-thread. However, there is a
>> significant cost to doing this that I would rather not incur.
>
> What cost is this? Are you speaking of cost in terms of what you the
> programmer would have to do, cost in terms of setting things up and
> communicating with the process, or the cost of creating a process vs a
> thread?  If it's the last, on most modern OS's (particularly Linux),
> it's really not that expensive.  On Linux the cost of threads and
> processes are nearly the same.

If you want my guess, the cost of going to multiple processes would be
to do with passing data back and forth between them. Why is Python
being embedded in another application? Sounds like there's data moving
from C to Python to C, ergo breaking that into separate processes
means lots of IPC.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Embedding multiple interpreters Chris Angelico <rosuav@gmail.com> - 2013-12-06 16:21 +1100

csiph-web