newbie threading question
douglas savitsky
dsavitsk at e-coli.net
Thu Jul 26 01:33:30 EDT 2001
this is a slightly modified version of a response from the other day using
win32process.beginthreadex() instead of thread ...
# ------------------------------
import win32process
import time
def Func(id, numSecs, incBy):
val = 0
while 1:
print id, val
val = val + incBy
time.sleep(numSecs)
if val > 10: break
return 1
if __name__ == '__main__':
a = win32process.beginthreadex(None, 0, Func, ("First thread", 1, 2), 1)
b = win32process.beginthreadex(None, 0, Func, ("Second thread", 1, 3),
1)
# ------------------------------
is there anyway to capture the return value? i need to run several
simultaneous large computations, but i would like to capture the returns ...
i think? do i not? can anyone give some suggestions on where to look?
thanks
doug
More information about the Python-list
mailing list