7c355f4ee18b25fcab7c501ba0b531ac1b564350,src/python/pants/pantsd/service/store_gc_service.py,StoreGCService,run,#StoreGCService#,60

Before Change


    self._garbage_collection_thread.start()

    while not self.is_killed:
      time.sleep(1)

After Change



  def run(self):
    Main service entrypoint. Called via Thread.start() via PantsDaemon.run().
    jobs = (self._extend_lease, self._garbage_collect)
    threads = [self._launch_thread(job) for job in jobs]

    while not self.is_killed:
      for thread in threads:
        // If any job threads die, we want to exit the `PantsService` thread to cause
        // a daemon teardown.
        if not thread.isAlive():
          self._logger.warn("thread {} died - aborting!".format(thread))
          return
        thread.join(.1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 7c355f4ee18b25fcab7c501ba0b531ac1b564350
Time: 2018-01-25
Author: kwlzn@users.noreply.github.com
File Name: src/python/pants/pantsd/service/store_gc_service.py
Class Name: StoreGCService
Method Name: run


Project Name: AlexsLemonade/refinebio
Commit Name: 9e9356fd14e49fd1ab5949768385c5bf6657fa40
Time: 2019-09-13
Author: davidsmejia@gmail.com
File Name: foreman/data_refinery_foreman/foreman/management/commands/feed_the_beast.py
Class Name: Command
Method Name: handle


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: af164f572888a7ebdd2e6d297f6e35d98d598e53
Time: 2021-03-15
Author: tohaowu@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_virtual_machine.py
Class Name: GceVirtualMachine
Method Name: UpdateInterruptibleVmStatus