>>>>> Alex Jurkiewicz <[email protected]> (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 <[email protected]>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: [email protected]
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to