Пример #1
0
    """
    def recv_task_online(self,is_fast=True):
        recv = ReceiveOnline()
        recv.run(is_fast)

if( __name__ == "__main__"):
    start_time = time.time()
    #que = queue.Queue()
    send_thread_list = []
    #receive_thread_list = []
    cmcc = Cmcc()
    data_path = './data/data.txt'
    path_pre = data_path[0:-4]
    thread_count = 4
    data = DataFile(data_path,thread_count)
    data.run()
    for i in range(0,thread_count):
        send_thread = threading.Thread(target=cmcc.send_task,args=(path_pre+str(i)+".txt","./data/Send_Thread"+str(i)+".txt"))
        send_thread.setDaemon(True)
        send_thread.start()
        send_thread_list.append(send_thread)
        time.sleep(3)
    #睡120秒再启动快线程
    time.sleep(120)
    thread = threading.Thread(target=cmcc.recv_task_online,args=(True,))
    thread.setDaemon(True)
    thread.start()
    thread_slow = None
    while True:
        """
        派单模块派单后需要相应的接单模块来处理