fork download
  1. import threading
  2. class My:
  3. def func(self, text):
  4. print text
  5. def thread(self):
  6. t = threading.Thread(target=self.func, args=(self, "Hello"))
  7. t.start()
  8.  
  9. m = My()
  10. m.thread()
Success #stdin #stdout 0.09s 19160KB
stdin
Standard input is empty
stdout
Standard output is empty