remove thread module

This commit is contained in:
breakwa11 2015-09-25 22:17:34 +08:00
parent 3e5cbb955e
commit 6f8fc5b77f
3 changed files with 21 additions and 5 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/python
import time
import sys
import thread
import threading
import os
os.chdir(os.path.split(os.path.realpath(__file__))[0])
@ -12,9 +12,17 @@ import db_transfer
# thread.start_new_thread(DbTransfer.thread_db, ())
# Api.web_server()
class MainThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
db_transfer.DbTransfer.thread_db()
if __name__ == '__main__':
#server_pool.ServerPool.get_instance()
#server_pool.ServerPool.get_instance().new_server(2333, '2333')
thread.start_new_thread(db_transfer.DbTransfer.thread_db, ())
thread = MainThread()
thread.start()
while True:
time.sleep(99999)