Distributing simple tasks

Thomas Raef traef at ebasedsecurity.com
Fri Feb 6 09:01:02 EST 2009


 

Hi,

Suppose I have an array of functions which I execute in threads (each
thread get a slice of the array, iterates over it and executes each
function in it's slice one after the other). Now I want to distribute
these tasks between two machines, i.e give each machine half of the
slices and let it run them in threads as described above. Is there an
easy way, or an article on this matter you can point me to?

Thanks, Noam

 

I would suggest maybe a separate queue machine that would hand out each
"next" function. That way if one machine takes a little longer, the
faster machine can keep picking off functions and running them, while
the slower machine can finish it's task.

 

Just a thought.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090206/f5b8b1d8/attachment.html>


More information about the Python-list mailing list