def threads_init ( gtk = True ) : # enable X11 multithreading x11 . XInitThreads ( ) if gtk : from gtk . gdk import threads_init threads_init ( )
python gtk starting separate thread but doesn't run
Enables multithreading support in Xlib and PyGTK . See the module docstring for more info . : Parameters : gtk : bool May be set to False to skip the PyGTK module .
def threads_init(gtk=True):
    """Enables multithreading support in Xlib and PyGTK.
    See the module docstring for more info.
    
    :Parameters:
      gtk : bool
        May be set to False to skip the PyGTK module.
    """
    # enable X11 multithreading
    x11.XInitThreads()
    if gtk:
        from gtk.gdk import threads_init
        threads_init()