f783edcd371ea4860982c55f16a24695be142c99,src/python/pants/base/worker_pool.py,WorkerPool,submit_async_work_chain,#WorkerPool#Any#Any#Any#,83

Before Change



    // We filter out Nones defensively. There shouldn"t be any, but if a bug causes one,
    // Pants might hang indefinitely without this filtering.
    work_iter = iter(filter(None, work_chain))

    def submit_next():
      try:
        self.submit_async_work(next(work_iter), workunit_parent=workunit_parent,

After Change



    // We filter out Nones defensively. There shouldn"t be any, but if a bug causes one,
    // Pants might hang indefinitely without this filtering.
    work_iter = (_f for _f in work_chain if _f)

    def submit_next():
      try:
        self.submit_async_work(next(work_iter), workunit_parent=workunit_parent,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: f783edcd371ea4860982c55f16a24695be142c99
Time: 2018-07-06
Author: ericarellano@me.com
File Name: src/python/pants/base/worker_pool.py
Class Name: WorkerPool
Method Name: submit_async_work_chain


Project Name: dmlc/gluon-nlp
Commit Name: 8c4dd89b40febc9d2493b7410aac530b6968ce70
Time: 2018-08-04
Author: leonard@lausen.nl
File Name: gluonnlp/data/stream.py
Class Name: _LanguageModelBPTTStream
Method Name: __iter__


Project Name: wandb/client
Commit Name: 976c9abf91d9e1912d5b35d1a8a19bac85851fee
Time: 2020-08-24
Author: jeff@wandb.com
File Name: wandb/internal/handler.py
Class Name: HandleManager
Method Name: handle_request_sampled_history


Project Name: pantsbuild/pants
Commit Name: eac5ecf8d3ca723865405599c764765306f78288
Time: 2018-08-06
Author: dawagner@gmail.com
File Name: src/python/pants/backend/jvm/subsystems/zinc.py
Class Name: Zinc
Method Name: compile_classpath