(self, disp=None)
return display
Retrieve a thread-safe display from XOpenDisplay().
        In multithreading, if the thread that creates *display* is dead, *display* will
        no longer be valid to grab the screen. The *display* attribute is replaced
        with *_display_dict* to maintain the *display* values in multithreading.
        Since the current thread and main thread are always alive, reuse their
        *display* value first.
Retrieve a thread-safe display from XOpenDisplay().
        In multithreading, if the thread that creates *display* is dead, *display* will
        no longer be valid to grab the screen. The *display* attribute is replaced
        with *_display_dict* to maintain the *display* values in multithreading.
        Since the current thread and main thread are always alive, reuse their
        *display* value first.
Retrieve a thread - safe display from XOpenDisplay () . In multithreading if the thread that creates * display * is dead * display * will no longer be valid to grab the screen . The * display * attribute is replaced with * _display_dict * to maintain the * display * values in multithreading . Since the current thread and main thread are always alive reuse their * display * value first .
def _get_display(self, disp=None):
        """
        Retrieve a thread-safe display from XOpenDisplay().
        In multithreading, if the thread that creates *display* is dead, *display* will
        no longer be valid to grab the screen. The *display* attribute is replaced
        with *_display_dict* to maintain the *display* values in multithreading.
        Since the current thread and main thread are always alive, reuse their
        *display* value first.
        """
        cur_thread, main_thread = threading.current_thread(), threading.main_thread()
        display = MSS._display_dict.get(cur_thread) or MSS._display_dict.get(
            main_thread
        )
        if not display:
            display = MSS._display_dict[cur_thread] = self.xlib.XOpenDisplay(disp)
        return display
def _get_display ( self , disp = None ) : cur_thread , main_thread = threading . current_thread ( ) , threading . main_thread ( ) display = MSS . _display_dict . get ( cur_thread ) or MSS . _display_dict . get ( main_thread ) if not display : display = MSS . _display_dict [ cur_thread ] = self . xlib . XOpenDisplay ( disp ) return display