I want to know how to implement concurrent threads in Python

Fábio Santos fabiosantosart at gmail.com
Tue May 28 02:02:23 EDT 2013


On 28 May 2013 05:06, "Daniel Gagliardi" <danielgagliardiramos at gmail.com>
wrote:
>
> fuck! fuck! i'm gonna be fired if i didnt get this shit! i told my boss
id do it. fuck! im gonna pipe some crakc. fuck...

So do it. You've already been told how to.

It's true that python does not do real concurrent execution, but if most of
your threads spend most time sleeping, waiting on a socket or doing IO,
those are opportunities for other threads to cut in and execute
concurrently and the threading module is your best choice.

If you need to do cpu-intensive tasks concurrently, use the multiprocessing
module.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130528/e345652f/attachment.html>


More information about the Python-list mailing list