e3464f7cfc09a5d909776386481a17f345bf9111,sim/gym_env.py,DeepDriveEnv,close_sim,#DeepDriveEnv#,182

Before Change


                self.sim_process.terminate()
                time.sleep(0.2)
                i = 0
                while self.sim_process.poll() is None:
                    log.info("Waiting for sim process to die")
                    time.sleep(0.1 * 2**i)
                    if i > 4:
                        // Die!

After Change


    def close_sim(self):
        log.info("Closing sim")
        process_to_kill = self.sim_process
        if process_to_kill is not None:
            utils.kill_process(process_to_kill)

    def _kill_competing_procs(self):
        // TODO: Allow for many environments on the same machine by using registry DB for this and sharedmem
        path = utils.get_sim_bin_path()
        if path is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepdrive/deepdrive
Commit Name: e3464f7cfc09a5d909776386481a17f345bf9111
Time: 2018-11-20
Author: cquiter@gmail.com
File Name: sim/gym_env.py
Class Name: DeepDriveEnv
Method Name: close_sim


Project Name: deepfakes/faceswap
Commit Name: 533025215d6629a1f506838fc9eeed33f2417591
Time: 2019-06-28
Author: 36920800+torzdf@users.noreply.github.com
File Name: lib/gui/wrapper.py
Class Name: FaceswapControl
Method Name: terminate


Project Name: mozilla/bugbug
Commit Name: b7a17d323cdabaab6e6c2d4ea0d3d27685d9de7d
Time: 2019-12-10
Author: mcastelluccio@mozilla.com
File Name: bugbug/rust_code_analysis_server.py
Class Name: RustCodeAnalysisServer
Method Name: __init__