92d26a01d73f0bc00405f51324756ae16b9f7d4a,sos/sos_task.py,TaskEngine,run,#TaskEngine#,550

Before Change


                    else:
                        env.logger.trace("Start submitting {} (status: {})".format(tid, self.task_status.get(tid, "unknown")))
                        t = concurrent.futures.ThreadPoolExecutor(max_workers=1)
                        self.submitting_tasks[tid] = (t, t.submit(self.execute_task, tid))
                //
                with threading.Lock():
                    for tid in to_run:
                        self.pending_tasks.remove(tid)

After Change


                if self._status_checker is None:
                    self._status_checker = self._thread_workers.submit(self.query_tasks, self.running_tasks, 1)
                    continue
                elif self._status_checker.running():
                    time.sleep(0.01)
                    continue
                else:
                    status_output = self._status_checker.result()
                    self._status_checker = None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: vatlab/SoS
Commit Name: 92d26a01d73f0bc00405f51324756ae16b9f7d4a
Time: 2017-04-16
Author: ben.bog@gmail.com
File Name: sos/sos_task.py
Class Name: TaskEngine
Method Name: run


Project Name: PaddlePaddle/edl
Commit Name: 45fd3cabf2a4145b47fa85d1ec380fc3b6ae7609
Time: 2020-08-06
Author: weibao.gong@gmail.com
File Name: python/paddle_edl/collective/launch.py
Class Name:
Method Name: launch


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 23a204d75f91c85bb542269447dbfa2164c695ce
Time: 2018-01-19
Author: max.lapan@gmail.com
File Name: ch13/wob_click_train.py
Class Name:
Method Name: