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


Groups > comp.lang.python > #80852

Re: Efficient Threading

References <CABcP1UeoZ2JHcFsMMtKWY3WfEEH5mSGup4i5=KCzzUKga9bKMw@mail.gmail.com>
Date 2014-11-15 21:18 -0800
Subject Re: Efficient Threading
From Dan Stromberg <drsalists@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.15867.1416115109.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Nov 14, 2014 at 10:42 AM, Empty Account <emptya45@gmail.com> wrote:
> Hi,
>
> I am thinking about writing a load test tool in Python, so I am interested
> in how I can create the most concurrent threads/processes with the fewest OS
> resources. I would imagine that I/O would need to be non-blocking.
>
> There are a number of options including standard library threading, gevent,
> stackless python, cython parallelism etc. Because I am new to Python, I am
> unsure on which libraries to choose. I am not really bothered on the tool
> chain, just as long as it is Python related (so I'd use PyPy for example).

If you need a large amount of concurrency, you might look at Jython
with threads.  Jython threads well.

If you don't intend to do more than a few hundred concurrent things,
you might just go with CPython and multiprocessing.

Fortunately, the interfaces are similar, so you can try one and switch
to another later without huge issues.  The main difference is that
multiprocessing doesn't show variable changes to other processes,
while multithreading (more often) does.

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


Thread

Re: Efficient Threading Dan Stromberg <drsalists@gmail.com> - 2014-11-15 21:18 -0800
  Re: Efficient Threading Marko Rauhamaa <marko@pacujo.net> - 2014-11-16 11:16 +0200

csiph-web