"Do this, and come back when you're done"

Paul Rubin http
Sat Dec 13 07:32:41 EST 2003


Kamus of Kadizhar <yan at NsOeSiPnAeMr.com> writes:
> Is there any way to rewrite each half of the function to run in the
> background, so to speak, and then have a master process that waits on
> the results?  This would cut execution time in half more or less.

Sure, use the threading module.  Think about another aspect of what
you're doing though.  You're comparing the md5's of a local and remote
copy of the same file, to see if they're the same.  Are you trying to
detect malicious tampering?  If someone tampered with one of the
files, how do you know that person can't also intercept your network
connection and send you the "correct" md5, so you won't detect the
tampering?  Or for that matter, do you know that the remote copy of
the program itself hasn't been tampered with?




More information about the Python-list mailing list