>>>>> Alex Jurkiewicz <a...@bluebottle.net.au> (AJ) wrote:

>AJ> def threadProcessRecipient():
[snip]
>AJ> if __name__ == '__main__':
>AJ>    THREADS = []
>AJ>    for i in range(CONCURRENCY):
>AJ>        THREADS.append(threading.Thread(target=threadProcessRecipient))
>AJ>    for thread in THREADS:
>AJ>        thread.run()

You should use thread.start(), not thread.run(). When you use run(), it
will be sequential execution, as you experience. With start() you get
concurrency
-- 
Piet van Oostrum <p...@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to