threads
Bart Nessux
bart_nessux at hotmail.com
Tue Jan 27 09:00:38 EST 2004
Could someone explain the concept of threads and how I might use them in
Python? I was a math major, not a CS major (theory instead of practice).
Most of my programming knowledge has grown out of system administration
and shell scripting, not professional software development.
How could I make this script threaded, and why should I, how would it
benefit me? The script already takes up 100% CPU resources, what would
using threads gain for me:
#!/usr/bin/python #change this to your Python's path
def cpu_test():
x = 0
while x < 999999999:
x = x + 1
print x
cpu_test()
cpu_test()
If the above is not suitable for threading, please give me a short
example of something that is.
Thanks!!!
More information about the Python-list
mailing list