3e7caaa9c1f40929f69a2062e2054159b60af75d,sos/sos_task.py,TaskEngine,run,#TaskEngine#,550
Before Change
env.logger.warning("Unrecognized response "{}" ({}): {}".format(line, e.__class__.__name__, e))
self.summarize_status()
env.logger.trace("{} submitting tasks: {}".format(len(self.submitting_tasks), self.submitting_tasks.keys()) )
if self.submitting_tasks:
with threading.Lock():
submitted = []
After Change
else:
// if nothing to do, sleep to avoid empty loop. This will reduce CPU usage from 100% to 0.3%
// sleeping longer will slightly reduce CPU usage but decrease responsiveness by a bit
time.sleep(0.01)
if self.submitting_tasks:
with threading.Lock():
submitted = []
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances Project Name: vatlab/SoS
Commit Name: 3e7caaa9c1f40929f69a2062e2054159b60af75d
Time: 2017-04-16
Author: ben.bog@gmail.com
File Name: sos/sos_task.py
Class Name: TaskEngine
Method Name: run
Project Name: pantsbuild/pants
Commit Name: 9506fbf0dbf8c4436c2ef808a4ceed4679c2488f
Time: 2020-05-12
Author: stuhood@twitter.com
File Name: src/python/pants/pantsd/service/pailgun_service.py
Class Name: PailgunService
Method Name: run
Project Name: DT42/BerryNet
Commit Name: 23d15da98ec99cf2b848f192c0763b55e1dbfc04
Time: 2020-02-15
Author: bofu@dt42.io
File Name: berrynet/client/camera.py
Class Name:
Method Name: main