src/spg/PatternGenerators/basePatternGenerator.py [372:406]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        threads = []
        results = {}

        # We loop over all the walls in the spd config
        for self.led_wall in self.spg.walls.values():

            results[self.led_wall.name] = {}
            self.get_and_create_pattern_output_folder(
                sub_folder="_".join([self.led_wall.name, self.name]))

            # We add a hook to perform custom logic before we start a new sequence
            self.sequence_start()
            for self.frame in range(self.number_of_frames()):

                # We add a hook to perform custom logic before we start a frame
                self.frame_start()

                # We get a dictionary of arguments to pass to our custom generator function
                kwargs = self.get_kwargs()

                # We create a new thread which executes our generator, which we start and keep track of
                thread = _ThreadedFunction(self.generator, self.frame, kwargs, results)
                thread.start()
                threads.append(thread)

                # We add a hook to perform custom logic as we end a frame
                self.frame_end()

            # We add a hook to perform custom logic as we end a sequence
            self.sequence_end()

        # We wait for all the frames to finish before we return the results
        [thread.join() for thread in threads]

        return results
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/spg/PatternGenerators/basePatternGenerator.py [417:451]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        threads = []
        results = {}

        # We loop over all the walls in the spd config
        for self.led_wall in self.spg.walls.values():

            results[self.led_wall.name] = {}
            self.get_and_create_pattern_output_folder(
                sub_folder="_".join([self.led_wall.name, self.name]))

        # We add a hook to perform custom logic before we start a new sequence
        self.sequence_start()
        for self.frame in range(self.number_of_frames()):

            # We add a hook to perform custom logic before we start a frame
            self.frame_start()

            # We get a dictionary of arguments to pass to our custom generator function
            kwargs = self.get_kwargs()

            # We create a new thread which executes our generator, which we start and keep track of
            thread = _ThreadedFunction(self.generator, self.frame, kwargs, results)
            thread.start()
            threads.append(thread)

            # We add a hook to perform custom logic as we end a frame
            self.frame_end()

        # We add a hook to perform custom logic as we end a sequence
        self.sequence_end()

        # We wait for all the frames to finish before we return the results
        [thread.join() for thread in threads]

        return results
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



