threads or queue for this task
Aahz
aahz at pythoncraft.com
Tue Sep 17 10:36:49 EDT 2002
In article <mailman.1032244699.24395.python-list at python.org>,
Bjorn Pettersen <BPettersen at NAREX.com> wrote:
>
>If you have any amount of data to process (why else would you be
>multithreading?) I've never seen producers and consumers being close
>enough in performance to not have the system end up swapping to death --
>unless, that is, if the queue is bounded. The Python Queue module
>supports most of this out-of-the-box, and adding timeouts is fairly
>trivial...
Well, one instance would be where producer and consumer are the same
threads. For example, a web spider. You *want* an unbounded queue in
that case to avoid deadlock.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Project Vote Smart: http://www.vote-smart.org/
More information about the Python-list
mailing list