def __init__(self,
                    set_thread_count_to_half_of_max=True,
                    queue=None):
        """
        Customize instance.
        """

        # super
        self.parent_class = super(ThreadManager, self)
        self.parent_class.__init__()

        self.setObjectName(self.__class__.__name__)

        # instance variables
        # ------------------------------------------------------------------
        # logger
        self.logger = renderthreads_logging.get_logger(self.__class__.__name__)

        # max_threads
        self.max_threads = determineNumberOfCPUs()

        # thread_count
        self.thread_count = self.max_threads
        # set_thread_count_to_half_of_max
        if (set_thread_count_to_half_of_max and
                self.max_threads > 1):

            # set thread count to half of max
            self.thread_count = int(self.max_threads / 2)

        # thread_list
        self.thread_list = []

        # queue
        self.queue = queue
        if not(self.queue):

            # create
            self.queue = Queue.PriorityQueue()

            # log
            self.logger.debug('No queue passed as argument. Creating queue.')

        # connect
        self.do_update_threads.connect(self.update_threads)