903b7eaec33fb4b1fd85c3fb5e0bb580586cfcce,QUANTAXIS/QATask/QA_Queue_standard.py,QA_Queue,run,#QA_Queue#,57

Before Change


        while not self.thread_stop:
            print("thread%d %s: waiting for tast" % (self.ident, self.name))
            try:
                task = q.get(block=True, timeout=20)  // 接收消息
            except Queue.Empty:
                print("Nothing to do!i will go home!")
                self.thread_stop = True

After Change


            QA_util_log_info("thread%d %s: waiting for task" %
                             (self.ident, self.name))
            "这是一个阻塞的队列,避免出现消息的遗漏"
            if self.__QA_queue_status() > 0:
                task = self.__QA_queue_pop()  // 接收消息

                print(task)
                QA_util_log_info(datetime.datetime.now())
                // QA_util_log_info(self.__QA_queue_status())

            else:
                QA_util_log_info("Task has been finished!")
                self.thread_stop = True
                break
            QA_util_log_info(datetime.datetime.now())
            QA_util_log_info("task recv:%s ,task No:%d" % (task[0], task[1]))

            QA_util_log_info("work finished!")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 903b7eaec33fb4b1fd85c3fb5e0bb580586cfcce
Time: 2017-06-30
Author: yutiansut@qq.com
File Name: QUANTAXIS/QATask/QA_Queue_standard.py
Class Name: QA_Queue
Method Name: run


Project Name: galeone/dynamic-training-bench
Commit Name: 0a68639f4c33323274e7829b9349d0170dc6c8ea
Time: 2017-02-08
Author: nessuno@nerdz.eu
File Name: evaluate.py
Class Name:
Method Name:


Project Name: polyaxon/polyaxon
Commit Name: 29a0a613e0bdb69be72e4f7b3580fb6fee59a2e7
Time: 2018-06-16
Author: mouradmourafiq@gmail.com
File Name: polyaxon/signals/experiment_groups.py
Class Name:
Method Name: experiment_group_status_post_save