2017년 1월 3일 화요일

python 3 thread

import _thread

# Define a function for the thread
def mythread():
   while 1:
      print ("test")


# Create two threads as follows
try:
   _thread.start_new_thread( mythread, () )
except:
    print ("thread error")

while 1:
   pas

댓글 없음:

댓글 쓰기