Return the result of previously queued scan commands; new commands cannot be queued once this is called.

        Returns:
            The results of all the scan commands previously queued. Each result will be an instance of the scan
            corresponding command's PluginScanResult subclass. If there was an unexpected error while running the scan
            command, it will be a 'PluginRaisedExceptionScanResult' instance instead.

def get_results(self) -> Iterable[PluginScanResult]:
        """Return the result of previously queued scan commands; new commands cannot be queued once this is called.

        Returns:
            The results of all the scan commands previously queued. Each result will be an instance of the scan
            corresponding command's PluginScanResult subclass. If there was an unexpected error while running the scan
            command, it will be a 'PluginRaisedExceptionScanResult' instance instead.
        """
        # Put a 'None' sentinel in the queue to let the each process know when every task has been completed
        for _ in range(self._get_current_processes_nb()):
            self._task_queue.put(None)

        for hostname, hostname_queue in self._hostname_queues_dict.items():
            for i in range(len(self._processes_dict[hostname])):
                hostname_queue.put(None)

        received_task_results = 0
        # Go on until all the tasks have been completed and all processes are done
        expected_task_results = self._queued_tasks_nb + self._get_current_processes_nb()
        while received_task_results != expected_task_results:
            result = self._result_queue.get()
            self._result_queue.task_done()
            received_task_results += 1
            if result is None:
                # Getting None means that one process was done
                pass
            else:
                # Getting an actual result
                yield result

        # Ensure all the queues and processes are done
        self._task_queue.join()
        self._result_queue.join()
        for hostname_queue in self._hostname_queues_dict.values():
            hostname_queue.join()
        for process_list in self._processes_dict.values():
            for process in process_list:
                process.join()