Hello all,

I am in the process of writing a multithreading program and what I was
wondering is a sleep command in an executing function will affect the
threads below it? Here is a basic example of what I mean.

def main():
   temp_var = True
   while temp_var == True:
       if
          t = threading.Thread( target = func1, args = "String") #note
this is probably non functional (example purposes for the question
only)
          t.start()
          temp_var  =  t.isAlive()
       else: 
           print "This line should display a lot"
           sleep(2)

def func1(s):
  print s

so the question I was wondering is if the sleep will pause the t
thread as well as the main function or is the thread independat of the
main function sleep?

Thanks in advance.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to